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:
Henri Yandell 2008-03-16 01:39:13 +00:00
parent 7cf943172b
commit 8a5d3acab8
2 changed files with 12 additions and 1 deletions

View File

@ -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));
}
}

View File

@ -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") );
}
}