lttng ui: Fix minor sonar warnings
[deliverable/tracecompass.git] / org.eclipse.linuxtools.lttng2.ui / src / org / eclipse / linuxtools / internal / lttng2 / ui / views / control / remote / CommandShell.java
index 95b50a6d81633f8cb50f8278111d3d9d7b5e14c8..8c56874811660660af219a8665f38904da95253b 100644 (file)
@@ -49,19 +49,19 @@ public class CommandShell implements ICommandShell {
     // ------------------------------------------------------------------------
 
     /** Sub-string to be echo'ed when running command in shell, used to indicate that the command has finished running */
-    public final static String DONE_MARKUP_STRING = "--RSE:donedonedone:--"; //$NON-NLS-1$
+    public static final String DONE_MARKUP_STRING = "--RSE:donedonedone:--"; //$NON-NLS-1$
 
     /** Sub-string to be echoed when running a command in shell. */
-    public final static String BEGIN_END_TAG = "BEGIN-END-TAG:"; //$NON-NLS-1$
+    public static final String BEGIN_END_TAG = "BEGIN-END-TAG:"; //$NON-NLS-1$
 
     /** Command delimiter for shell */
-    public final static String CMD_DELIMITER = "\n"; //$NON-NLS-1$
+    public static final String CMD_DELIMITER = "\n"; //$NON-NLS-1$
 
     /** Shell "echo" command */
-    public final static String SHELL_ECHO_CMD = " echo "; //$NON-NLS-1$
+    public static final String SHELL_ECHO_CMD = " echo "; //$NON-NLS-1$
 
     /** Default command separator */
-    public final static char CMD_SEPARATOR = ';';
+    public static final char CMD_SEPARATOR = ';';
 
     // ------------------------------------------------------------------------
     // Attributes
@@ -292,10 +292,8 @@ public class CommandShell implements ICommandShell {
             return true;
         }
         int index = line.indexOf(expected);
-        if (index > 0) {
-            if (line.indexOf(SHELL_ECHO_CMD) == -1) {
-                return true;
-            }
+        if ((index > 0) && (line.indexOf(SHELL_ECHO_CMD) == -1)) {
+            return true;
         }
 
         return false;
This page took 0.025387 seconds and 5 git commands to generate.