karaf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jbono...@apache.org
Subject karaf-cellar git commit: [KARAF-4259] Fix potential cast issue when copy a group configuration
Date Sun, 10 Jul 2016 20:04:08 GMT
Repository: karaf-cellar
Updated Branches:
  refs/heads/master 439381b6c -> 130525c55


[KARAF-4259] Fix potential cast issue when copy a group configuration


Project: http://git-wip-us.apache.org/repos/asf/karaf-cellar/repo
Commit: http://git-wip-us.apache.org/repos/asf/karaf-cellar/commit/130525c5
Tree: http://git-wip-us.apache.org/repos/asf/karaf-cellar/tree/130525c5
Diff: http://git-wip-us.apache.org/repos/asf/karaf-cellar/diff/130525c5

Branch: refs/heads/master
Commit: 130525c551ce345ad192cb9d8bbb5487733c368c
Parents: 439381b
Author: Jean-Baptiste Onofré <jbonofre@apache.org>
Authored: Sun Jul 10 22:03:29 2016 +0200
Committer: Jean-Baptiste Onofré <jbonofre@apache.org>
Committed: Sun Jul 10 22:03:29 2016 +0200

----------------------------------------------------------------------
 .../apache/karaf/cellar/hazelcast/HazelcastGroupManager.java | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/karaf-cellar/blob/130525c5/hazelcast/src/main/java/org/apache/karaf/cellar/hazelcast/HazelcastGroupManager.java
----------------------------------------------------------------------
diff --git a/hazelcast/src/main/java/org/apache/karaf/cellar/hazelcast/HazelcastGroupManager.java
b/hazelcast/src/main/java/org/apache/karaf/cellar/hazelcast/HazelcastGroupManager.java
index 97d5e5c..96b923d 100644
--- a/hazelcast/src/main/java/org/apache/karaf/cellar/hazelcast/HazelcastGroupManager.java
+++ b/hazelcast/src/main/java/org/apache/karaf/cellar/hazelcast/HazelcastGroupManager.java
@@ -518,10 +518,10 @@ public class HazelcastGroupManager implements GroupManager, EntryListener,
Confi
                     configAdminProperties = new Properties();
                 }
                 // get configuration from Hazelcast
-                Map<String, String> sourceGropConfig = instance.getMap(GROUPS_CONFIG);
+                Map<String, String> sourceGroupConfig = instance.getMap(GROUPS_CONFIG);
 
                 // update local configuration from cluster
-                for (Map.Entry<String, String> parentEntry : sourceGropConfig.entrySet())
{
+                for (Map.Entry<String, String> parentEntry : sourceGroupConfig.entrySet())
{
                     configAdminProperties.put(parentEntry.getKey(), parentEntry.getValue());
                 }
 
@@ -529,12 +529,12 @@ public class HazelcastGroupManager implements GroupManager, EntryListener,
Confi
                 Enumeration keyEnumeration = configAdminProperties.keys();
                 while (keyEnumeration.hasMoreElements()) {
                     String key = (String) keyEnumeration.nextElement();
-                    String value = (String) configAdminProperties.get(key);
+                    String value = configAdminProperties.get(key).toString();
 
                     if (key.startsWith(sourceGroupName)) {
                         String newKey = key.replace(sourceGroupName, targetGroupName);
                         updatedProperties.put(newKey, value);
-                        sourceGropConfig.put(key, value);
+                        sourceGroupConfig.put(key, value);
                     }
                     updatedProperties.put(key, value);
                 }


Mime
View raw message