Bug-380 SwitchManager.getHardwareMAC() does not handle empty string case 02/6402/1
authorMoiz Raja <moraja@cisco.com>
Mon, 27 Jan 2014 20:42:58 +0000 (12:42 -0800)
committerMoiz Raja <moraja@cisco.com>
Fri, 25 Apr 2014 21:29:33 +0000 (14:29 -0700)
Change-Id: Id82fd6e0bd214dcb00773a907daf94067671979b
Signed-off-by: Alessandro Boch <aboch@cisco.com>
Signed-off-by: Moiz Raja <moraja@cisco.com>
opendaylight/switchmanager/implementation/src/main/java/org/opendaylight/controller/switchmanager/internal/SwitchManager.java

index 770180c04e7ae754e91d12659ae43ea2577a3d4b..ca6987ad6cf23cb3fa142b8d6747da0cc3fa0a8e 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;
             }
         }