You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by ba...@apache.org on 2008/03/16 02:39:16 UTC
svn commit: r637503 - in /commons/proper/collections/trunk/src:
java/org/apache/commons/collections/ExtendedProperties.java
test/org/apache/commons/collections/TestExtendedProperties.java
Author: bayard
Date: Sat Mar 15 18:39:13 2008
New Revision: 637503
URL: http://svn.apache.org/viewvc?rev=637503&view=rev
Log:
Applying the patch from Alexander Borovsky for COLLECTIONS-271
Modified:
commons/proper/collections/trunk/src/java/org/apache/commons/collections/ExtendedProperties.java
commons/proper/collections/trunk/src/test/org/apache/commons/collections/TestExtendedProperties.java
Modified: commons/proper/collections/trunk/src/java/org/apache/commons/collections/ExtendedProperties.java
URL: http://svn.apache.org/viewvc/commons/proper/collections/trunk/src/java/org/apache/commons/collections/ExtendedProperties.java?rev=637503&r1=637502&r2=637503&view=diff
==============================================================================
--- commons/proper/collections/trunk/src/java/org/apache/commons/collections/ExtendedProperties.java (original)
+++ commons/proper/collections/trunk/src/java/org/apache/commons/collections/ExtendedProperties.java Sat Mar 15 18:39:13 2008
@@ -813,7 +813,7 @@
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));
}
}
Modified: commons/proper/collections/trunk/src/test/org/apache/commons/collections/TestExtendedProperties.java
URL: http://svn.apache.org/viewvc/commons/proper/collections/trunk/src/test/org/apache/commons/collections/TestExtendedProperties.java?rev=637503&r1=637502&r2=637503&view=diff
==============================================================================
--- commons/proper/collections/trunk/src/test/org/apache/commons/collections/TestExtendedProperties.java (original)
+++ commons/proper/collections/trunk/src/test/org/apache/commons/collections/TestExtendedProperties.java Sat Mar 15 18:39:13 2008
@@ -396,4 +396,15 @@
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") );
+ }
+
}