Switch to JDT annotations for Nullable and NonNull
[netvirt.git] / elanmanager / impl / src / main / java / org / opendaylight / netvirt / elan / cli / etree / EtreeInterfaceDelete.java
index b4a7a27cbe2093966fc3fbc03d2754b1f4f862a2..6a06e828252ee75ce2e8943184674c7aeea47b8a 100644 (file)
@@ -10,6 +10,7 @@ package org.opendaylight.netvirt.elan.cli.etree;
 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.netvirt.elanmanager.api.IElanService;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.elan.etree.rev160614.EtreeInterface;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.elan.rev150602.elan.interfaces.ElanInterface;
@@ -31,11 +32,12 @@ public class EtreeInterfaceDelete extends OsgiCommandSupport {
     }
 
     @Override
+    @Nullable
     protected Object doExecute() {
-        LOG.debug("Deleting EtreeInterface command" + "\t" + etreeName + "\t" + interfaceName + "\t");
+        LOG.debug("Deleting EtreeInterface command etreeName:{}, interfaceName:{}", etreeName, interfaceName);
         ElanInterface existingInterface =
                 elanProvider.getElanInterfaceByElanInterfaceName(interfaceName);
-        if (existingInterface == null || existingInterface.getAugmentation(EtreeInterface.class) == null) {
+        if (existingInterface == null || existingInterface.augmentation(EtreeInterface.class) == null) {
             session.getConsole()
                     .println("Etree interface doesn't exist or isn't configured as etree: " + interfaceName);
         }