lttng ui: Fix minor sonar warnings
[deliverable/tracecompass.git] / org.eclipse.linuxtools.lttng2.ui / src / org / eclipse / linuxtools / internal / lttng2 / ui / views / control / service / LTTngControlService.java
index e6f2439a57a80d02ff961aebc39e65b096e35e1f..d660dcfdbbff742c2168f9c317bed84cbf8a9840 100644 (file)
@@ -44,7 +44,6 @@ import org.eclipse.linuxtools.internal.lttng2.ui.views.control.messages.Messages
 import org.eclipse.linuxtools.internal.lttng2.ui.views.control.preferences.ControlPreferences;
 import org.eclipse.linuxtools.internal.lttng2.ui.views.control.remote.ICommandResult;
 import org.eclipse.linuxtools.internal.lttng2.ui.views.control.remote.ICommandShell;
-import org.osgi.framework.Version;
 
 /**
  * <p>
@@ -61,12 +60,12 @@ public class LTTngControlService implements ILttngControlService {
     /**
      * The command shell implementation
      */
-    protected ICommandShell fCommandShell = null;
+    private final ICommandShell fCommandShell;
 
     /**
      * The version string.
      */
-    protected Version fVersion = null;
+    private LttngVersion fVersion = null;
 
     // ------------------------------------------------------------------------
     // Constructors
@@ -99,15 +98,24 @@ public class LTTngControlService implements ILttngControlService {
      * @param version - a version to set
      */
     public void setVersion(String version) {
-        fVersion = new Version(version);
+        fVersion = new LttngVersion(version);
     }
 
     @Override
     public boolean isVersionSupported(String version) {
-        Version tmp = new Version(version);
+        LttngVersion tmp = new LttngVersion(version);
         return (fVersion != null && fVersion.compareTo(tmp) >= 0) ? true : false;
     }
 
+    /**
+     * Returns the command shell implementation.
+     *
+     * @return the command shell implementation
+     */
+    protected ICommandShell getCommandShell() {
+        return fCommandShell;
+    }
+
     // ------------------------------------------------------------------------
     // Operations
     // ------------------------------------------------------------------------
@@ -857,11 +865,7 @@ public class LTTngControlService implements ILttngControlService {
 
     @Override
     public void calibrate(boolean isKernel, IProgressMonitor monitor) throws ExecutionException {
-//        String newSessionName = formatParameter(sessionName);
         StringBuffer command = createCommand(LTTngControlServiceConstants.COMMAND_CALIBRATE);
-//
-//        command.append(OPTION_SESSION);
-//        command.append(newSessionName);
 
         if (isKernel) {
             command.append(LTTngControlServiceConstants.OPTION_KERNEL);
@@ -1138,10 +1142,6 @@ public class LTTngControlService implements ILttngControlService {
             } else {
                 index++;
             }
-//            else if (line.matches(EVENT_NONE_PATTERN)) {
-                // do nothing
-//            } else
-
         }
 
         return index;
This page took 0.024952 seconds and 5 git commands to generate.