+/*\r
+ * Copyright (C) 2010 Mathieu Baudier <mbaudier@argeo.org>\r
+ *\r
+ * Licensed under the Apache License, Version 2.0 (the "License");\r
+ * you may not use this file except in compliance with the License.\r
+ * You may obtain a copy of the License at\r
+ *\r
+ * http://www.apache.org/licenses/LICENSE-2.0\r
+ *\r
+ * Unless required by applicable law or agreed to in writing, software\r
+ * distributed under the License is distributed on an "AS IS" BASIS,\r
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+ * See the License for the specific language governing permissions and\r
+ * limitations under the License.\r
+ */\r
+\r
package org.argeo.slc.process;\r
\r
-import java.io.IOException;\r
-import java.io.StringReader;\r
import java.util.ArrayList;\r
import java.util.Date;\r
import java.util.List;\r
+import java.util.StringTokenizer;\r
import java.util.UUID;\r
\r
-import org.apache.commons.io.IOUtils;\r
-\r
public class SlcExecutionStep {\r
public final static String TYPE_START = "START";\r
public final static String TYPE_END = "END";\r
this.logLines = logLines;\r
}\r
\r
- @SuppressWarnings(value = { "unchecked" })\r
public void addLog(String log) {\r
if (log == null)\r
return;\r
\r
- try {\r
- List<String> lines = IOUtils.readLines(new StringReader(log));\r
- logLines.addAll(lines);\r
- } catch (IOException e) {\r
- throw new RuntimeException("Cannot add log", e);\r
- }\r
+ StringTokenizer st = new StringTokenizer(log, "\n");\r
+ while (st.hasMoreTokens())\r
+ logLines.add(st.nextToken());\r
}\r
\r
@Override\r