Merge "Bug 380 SwitchManager.getHardwareMAC() does not handle empty string case"
authorGiovanni Meo <gmeo@cisco.com>
Wed, 29 Jan 2014 05:38:31 +0000 (05:38 +0000)
committerGerrit Code Review <gerrit@opendaylight.org>
Wed, 29 Jan 2014 05:38:31 +0000 (05:38 +0000)
opendaylight/switchmanager/implementation/src/main/java/org/opendaylight/controller/switchmanager/internal/SwitchManager.java

index 770180c..ca6987a 100644 (file)
@@ -1397,7 +1397,7 @@ public class SwitchManager implements ISwitchManager, IConfigurationContainerAwa
             } catch (SocketException e) {
                 log.error("Failed to acquire controller MAC: ", e);
             }
-            if (macAddress != null) {
+            if (macAddress != null && macAddress.length != 0) {
                 break;
             }
         }