Bug 380 SwitchManager.getHardwareMAC() does not handle empty string case 30/4930/2
authorAlessandro Boch <aboch@cisco.com>
Mon, 27 Jan 2014 20:42:58 +0000 (12:42 -0800)
committerGerrit Code Review <gerrit@opendaylight.org>
Wed, 29 Jan 2014 04:21:09 +0000 (04:21 +0000)
Change-Id: Iaaaa63eeade69c0e2aac4299297c40fda3016584
Signed-off-by: Alessandro Boch <aboch@cisco.com>
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;
             }
         }