Merge branch 'master' into lttng-kepler
[deliverable/tracecompass.git] / org.eclipse.linuxtools.lttng2.ui.tests / stubs / org / eclipse / linuxtools / internal / lttng2 / stubs / shells / LTTngToolsFileShell.java
index c436905bc9b467888a0483d7071bb57fc3e81724..f96fbef969cb0023326d8c928b0e441efe508e26 100644 (file)
@@ -184,7 +184,9 @@ public class LTTngToolsFileShell extends TestCommandShell {
                         result = Integer.parseInt(strLine);
                     }  else if (OUTPUT_END_KEY.equals(strLine)) {
                         // Save output/result in command map
-                        commandMap.put(input, new CommandResult(result, output.toArray(new String[output.size()])));
+                        if (output != null) {
+                            commandMap.put(input, new CommandResult(result, output.toArray(new String[output.size()])));
+                        }
                         inOutput = false;
                     } else if (OUTPUT_KEY.equals(strLine)) {
                         // first line of output
@@ -195,10 +197,14 @@ public class LTTngToolsFileShell extends TestCommandShell {
                         while (isComment(strLine)) {
                             strLine = br.readLine();
                         }
-                        output.add(strLine);
+                        if (output != null) {
+                            output.add(strLine);
+                        }
                     } else if (inOutput) {
                         // subsequent lines of output
-                        output.add(strLine);
+                        if (output != null) {
+                            output.add(strLine);
+                        }
                     }
 //                    else {
 //                        if (RESULT_END_KEY.equals(strLine)) {
@@ -258,7 +264,7 @@ public class LTTngToolsFileShell extends TestCommandShell {
     // ------------------------------------------------------------------------
     // Helper methods
     // ------------------------------------------------------------------------
-    private boolean isComment(String line) {
+    private static boolean isComment(String line) {
         if (line == null) {
             throw new RuntimeException("line is null"); //$NON-NLS-1$
         }
This page took 0.024356 seconds and 5 git commands to generate.