Applying the patch from Alexander Borovsky for COLLECTIONS-271
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/collections/trunk@637503 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
7cf943172b
commit
8a5d3acab8
|
@ -813,7 +813,7 @@ public class ExtendedProperties extends Hashtable {
|
|||
public void combine(ExtendedProperties props) {
|
||||
for (Iterator it = props.getKeys(); it.hasNext();) {
|
||||
String key = (String) it.next();
|
||||
setProperty(key, props.get(key));
|
||||
super.put(key, props.get(key));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -396,4 +396,15 @@ public class TestExtendedProperties extends TestCase {
|
|||
assertFalse(it.hasNext());
|
||||
}
|
||||
|
||||
public void testCollections271() {
|
||||
ExtendedProperties props = new ExtendedProperties();
|
||||
props.setProperty("test", "\\\\\\\\192.168.1.91\\\\test");
|
||||
props.getProperty("test");
|
||||
assertEquals( "\\\\192.168.1.91\\test", props.getProperty("test") );
|
||||
|
||||
ExtendedProperties props2 = new ExtendedProperties();
|
||||
props2.combine(props);
|
||||
assertEquals( "\\\\192.168.1.91\\test", props2.getProperty("test") );
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue