Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'bundles/org.eclipse.equinox.p2.core')
-rw-r--r--bundles/org.eclipse.equinox.p2.core/src/org/eclipse/equinox/internal/p2/core/helpers/OrderedProperties.java10
1 files changed, 8 insertions, 2 deletions
diff --git a/bundles/org.eclipse.equinox.p2.core/src/org/eclipse/equinox/internal/p2/core/helpers/OrderedProperties.java b/bundles/org.eclipse.equinox.p2.core/src/org/eclipse/equinox/internal/p2/core/helpers/OrderedProperties.java
index f41cc5ce5..81ad8c7f8 100644
--- a/bundles/org.eclipse.equinox.p2.core/src/org/eclipse/equinox/internal/p2/core/helpers/OrderedProperties.java
+++ b/bundles/org.eclipse.equinox.p2.core/src/org/eclipse/equinox/internal/p2/core/helpers/OrderedProperties.java
@@ -43,6 +43,12 @@ public class OrderedProperties extends Dictionary<String, String> implements Map
propertyMap = new LinkedHashMap<>(size);
}
+ public OrderedProperties(Map<String, String> properties) {
+ super();
+ propertyMap = new LinkedHashMap<>(properties.size());
+ putAll(properties);
+ }
+
/**
* Set the property value.
* <p>
@@ -57,7 +63,7 @@ public class OrderedProperties extends Dictionary<String, String> implements Map
*/
public Object setProperty(String key, String value) {
init();
- return propertyMap.put(key, value);
+ return propertyMap.put(key.intern(), value);
}
public String getProperty(String key) {
@@ -91,7 +97,7 @@ public class OrderedProperties extends Dictionary<String, String> implements Map
@Override
public String put(String key, String value) {
init();
- return propertyMap.put(key, value);
+ return propertyMap.put(key.intern(), value);
}
@Override

Back to the top