Make private methods static
[netvirt.git] / elanmanager / impl / src / main / java / org / opendaylight / netvirt / elan / cli / etree / EtreeInterfaceGet.java
index 97c6719be7e5096b224016905e7878edb9dcf235..16da1a59e86e18bc02e7a92fb0b16fd58d148b92 100644 (file)
@@ -11,6 +11,7 @@ import java.util.List;
 import org.apache.karaf.shell.commands.Argument;
 import org.apache.karaf.shell.commands.Command;
 import org.apache.karaf.shell.console.OsgiCommandSupport;
+import org.eclipse.jdt.annotation.Nullable;
 import org.opendaylight.genius.interfacemanager.globals.InterfaceInfo;
 import org.opendaylight.genius.interfacemanager.interfaces.IInterfaceManager;
 import org.opendaylight.netvirt.elan.utils.ElanCLIUtils;
@@ -40,12 +41,12 @@ public class EtreeInterfaceGet extends OsgiCommandSupport {
     }
 
     @Override
+    @Nullable
     protected Object doExecute() {
-        LOG.debug("Executing Get EtreeInterface command for the corresponding Etree Instance" + "\t" + etreeName
-                + "\t");
+        LOG.debug("Executing Get EtreeInterface command for the corresponding Etree Instance {}", etreeName);
         if (etreeName != null) {
             ElanInstance elanInstance = elanProvider.getElanInstance(etreeName);
-            if (elanInstance == null || elanInstance.getAugmentation(EtreeInstance.class) == null) {
+            if (elanInstance == null || elanInstance.augmentation(EtreeInstance.class) == null) {
                 session.getConsole().println("Etree instance doesn't exist or isn't configured as etree: " + etreeName);
                 return null;
             }
@@ -73,7 +74,7 @@ public class EtreeInterfaceGet extends OsgiCommandSupport {
         return null;
     }
 
-    private Object getEtreeInterfaceHeaderOutput() {
+    private static Object getEtreeInterfaceHeaderOutput() {
         StringBuilder headerBuilder = new StringBuilder();
         headerBuilder.append(String.format(ElanCLIUtils.ETREE_INTERFACE_CLI_FORMAT, "EtreeInstance/Tag",
                 "EtreeInterface/Tag", "OpState", "AdminState", "Root/Leaf"));