summaryrefslogtreecommitdiff
path: root/java/src
diff options
context:
space:
mode:
Diffstat (limited to 'java/src')
-rw-r--r--java/src/Ice/PropertiesI.java10
1 files changed, 9 insertions, 1 deletions
diff --git a/java/src/Ice/PropertiesI.java b/java/src/Ice/PropertiesI.java
index caaf2603a15..ff76acfb62e 100644
--- a/java/src/Ice/PropertiesI.java
+++ b/java/src/Ice/PropertiesI.java
@@ -457,7 +457,15 @@ public final class PropertiesI implements Properties
{
if(defaults != null)
{
- _properties = new java.util.HashMap<String, PropertyValue>(((PropertiesI)defaults)._properties);
+ //
+ // NOTE: we can't just do a shallow copy of the map as the map values
+ // would otherwise be shared between the two PropertiesI object.
+ //
+ //_properties = new java.util.HashMap<String, PropertyValue>(((PropertiesI)defaults)._properties);
+ for(java.util.Map.Entry<String, PropertyValue> p : (((PropertiesI)defaults)._properties).entrySet())
+ {
+ _properties.put(p.getKey(), new PropertyValue(p.getValue()));
+ }
}
boolean loadConfigFiles = false;