brooklyn-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From aleds...@apache.org
Subject [1/7] incubator-brooklyn git commit: Avoid NPE in PortForwardManager.rebindSupport
Date Thu, 15 Jan 2015 10:11:59 GMT
Repository: incubator-brooklyn
Updated Branches:
  refs/heads/master 6455a9da2 -> e4ecb3871


Avoid NPE in PortForwardManager.rebindSupport

- caused by publicIpIdToHostname containing a null key or null value
  (not sure what; it’s deprecated so not worrying about it!).
- Instead of ImmutableMap for copying it, use MutableMap.copyOf
  so will not fail on null.


Project: http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/commit/c61a3093
Tree: http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/tree/c61a3093
Diff: http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/diff/c61a3093

Branch: refs/heads/master
Commit: c61a309302240c6108243ef25341802a12031d56
Parents: d89062b
Author: Aled Sage <aled.sage@gmail.com>
Authored: Fri Jan 9 12:12:12 2015 +0000
Committer: Aled Sage <aled.sage@gmail.com>
Committed: Wed Jan 14 22:38:08 2015 +0000

----------------------------------------------------------------------
 .../java/brooklyn/location/access/PortForwardManagerImpl.java    | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/blob/c61a3093/core/src/main/java/brooklyn/location/access/PortForwardManagerImpl.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/brooklyn/location/access/PortForwardManagerImpl.java b/core/src/main/java/brooklyn/location/access/PortForwardManagerImpl.java
index 7d30a69..c9a596b 100644
--- a/core/src/main/java/brooklyn/location/access/PortForwardManagerImpl.java
+++ b/core/src/main/java/brooklyn/location/access/PortForwardManagerImpl.java
@@ -117,8 +117,8 @@ public class PortForwardManagerImpl extends AbstractLocation implements
PortForw
                 Map<String, PortMapping> mappingsCopy;
                 Map<String,String> publicIpIdToHostnameCopy;
                 synchronized (mutex) {
-                    mappingsCopy = ImmutableMap.copyOf(mappings);
-                    publicIpIdToHostnameCopy = ImmutableMap.copyOf(publicIpIdToHostname);
+                    mappingsCopy = MutableMap.copyOf(mappings);
+                    publicIpIdToHostnameCopy = MutableMap.copyOf(publicIpIdToHostname);
                 }
                 return getMementoWithProperties(MutableMap.<String,Object>of(
                         "mappings", mappingsCopy, 


Mime
View raw message