commit | 4c8e108f23290c22d20c46412271f3211fd8d283 | [log] [tgz] |
---|---|---|
author | Umesh Krishnaswamy <krishji@gmail.com> | Thu Jan 24 23:15:37 2013 -0800 |
committer | Umesh Krishnaswamy <krishji@gmail.com> | Thu Jan 24 23:15:37 2013 -0800 |
tree | 343519d5822f2d68ed14188767ae206a33f7de1f | |
parent | c56a8cc17f7acbdded3e1f7ba5fc2ff6e18bdb09 [diff] |
Bug005: fix remotesw null pointer exception.
diff --git a/src/main/java/net/floodlightcontroller/linkdiscovery/internal/LinkDiscoveryManager.java b/src/main/java/net/floodlightcontroller/linkdiscovery/internal/LinkDiscoveryManager.java index 6fc6d62..3df8bb8 100644 --- a/src/main/java/net/floodlightcontroller/linkdiscovery/internal/LinkDiscoveryManager.java +++ b/src/main/java/net/floodlightcontroller/linkdiscovery/internal/LinkDiscoveryManager.java
@@ -524,7 +524,8 @@ IOFSwitch remotesw = null; // add a switch if we have not seen it before - if (!remoteSwitches.containsKey(sw)) { + remotesw = remoteSwitches.get(sw); + if (remotesw == null) { remotesw = new OFSwitchImpl(); remotesw.setupRemoteSwitch(sw); remoteSwitches.put(remotesw.getId(), remotesw);