Author: oheger
Date: Fri Feb 18 20:06:08 2011
New Revision: 1072120
URL: http://svn.apache.org/viewvc?rev=1072120&view=rev
Log:
[CONFIGURATION-363] Updated dependency to Commons Lang. With the new version of
StrSubstitutor interpolation in variable names is now possible.
Modified:
commons/proper/configuration/trunk/pom.xml
commons/proper/configuration/trunk/src/changes/changes.xml
commons/proper/configuration/trunk/src/test/org/apache/commons/configuration/TestAbstractConfigurationBasicFeatures.java
Modified: commons/proper/configuration/trunk/pom.xml
URL:
http://svn.apache.org/viewvc/commons/proper/configuration/trunk/pom.xml?rev=1072120&r1=1072119&r2=1072120&view=diff
==============================================================================
--- commons/proper/configuration/trunk/pom.xml (original)
+++ commons/proper/configuration/trunk/pom.xml Fri Feb 18 20:06:08 2011
@@ -210,7 +210,7 @@
<dependency>
<groupId>commons-lang</groupId>
<artifactId>commons-lang</artifactId>
- <version>2.5</version>
+ <version>2.6</version>
</dependency>
<dependency>
Modified: commons/proper/configuration/trunk/src/changes/changes.xml
URL:
http://svn.apache.org/viewvc/commons/proper/configuration/trunk/src/changes/changes.xml?rev=1072120&r1=1072119&r2=1072120&view=diff
==============================================================================
--- commons/proper/configuration/trunk/src/changes/changes.xml (original)
+++ commons/proper/configuration/trunk/src/changes/changes.xml Fri Feb 18
20:06:08 2011
@@ -124,6 +124,10 @@
<action dev="rgoers" type="fix" issue="CONFIGURATION-388">
Attribute or element values will not be escaped when attribute or
element splitting are disabled.
</action>
+ <action dev="oheger" type="add" issue="CONFIGURATION-363">
+ When using Commons Lang 2.6 or higher as dependency nested
interpolation
+ in variable names is supported.
+ </action>
<action dev="ebourg" type="fix" issue="CONFIGURATION-362">
Empty dictionaries in a PropertyList configuration are now preserved
when the configuration is saved.
</action>
Modified:
commons/proper/configuration/trunk/src/test/org/apache/commons/configuration/TestAbstractConfigurationBasicFeatures.java
URL:
http://svn.apache.org/viewvc/commons/proper/configuration/trunk/src/test/org/apache/commons/configuration/TestAbstractConfigurationBasicFeatures.java?rev=1072120&r1=1072119&r2=1072120&view=diff
==============================================================================
---
commons/proper/configuration/trunk/src/test/org/apache/commons/configuration/TestAbstractConfigurationBasicFeatures.java
(original)
+++
commons/proper/configuration/trunk/src/test/org/apache/commons/configuration/TestAbstractConfigurationBasicFeatures.java
Fri Feb 18 20:06:08 2011
@@ -336,6 +336,20 @@ public class TestAbstractConfigurationBa
}
/**
+ * Tests whether interpolation works in variable names.
+ */
+ public void testNestedVariableInterpolation()
+ {
+ BaseConfiguration config = new BaseConfiguration();
+ config.getSubstitutor().setEnableSubstitutionInVariables(true);
+ config.addProperty("java.version", "1.4");
+ config.addProperty("jre-1.4", "C:\\java\\1.4");
+ config.addProperty("jre.path", "${jre-${java.version}}");
+ assertEquals("Wrong path", "C:\\java\\1.4",
+ config.getString("jre.path"));
+ }
+
+ /**
* Creates the source configuration for testing the copy() and append()
* methods. This configuration contains keys with an odd index and values
* starting with the prefix "src". There are also some list properties.