commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ohe...@apache.org
Subject svn commit: r751302 - /commons/proper/configuration/trunk/src/test/org/apache/commons/configuration/TestDefaultConfigurationBuilder.java
Date Sat, 07 Mar 2009 18:11:02 GMT
Author: oheger
Date: Sat Mar  7 18:11:02 2009
New Revision: 751302

URL: http://svn.apache.org/viewvc?rev=751302&view=rev
Log:
Removed System.clearProperty() as it was introduced in JDK 1.5.
Also removed two unused variables.

Modified:
    commons/proper/configuration/trunk/src/test/org/apache/commons/configuration/TestDefaultConfigurationBuilder.java

Modified: commons/proper/configuration/trunk/src/test/org/apache/commons/configuration/TestDefaultConfigurationBuilder.java
URL: http://svn.apache.org/viewvc/commons/proper/configuration/trunk/src/test/org/apache/commons/configuration/TestDefaultConfigurationBuilder.java?rev=751302&r1=751301&r2=751302&view=diff
==============================================================================
--- commons/proper/configuration/trunk/src/test/org/apache/commons/configuration/TestDefaultConfigurationBuilder.java
(original)
+++ commons/proper/configuration/trunk/src/test/org/apache/commons/configuration/TestDefaultConfigurationBuilder.java
Sat Mar  7 18:11:02 2009
@@ -19,9 +19,9 @@
 import java.io.File;
 import java.io.IOException;
 import java.util.Collection;
-import java.util.Set;
-import java.util.Map;
 import java.util.HashMap;
+import java.util.Map;
+import java.util.Set;
 
 import junit.framework.TestCase;
 
@@ -815,13 +815,13 @@
         CombinedConfiguration cc = factory.getConfiguration(true);
         String value = cc.getInterpolator().lookup("test:test_key");
         assertNotNull("The test key was not located", value);
-        assertEquals("Incorrect value retrieved","test.value",value);       
+        assertEquals("Incorrect value retrieved","test.value",value);
     }
-         
+
     public void testSystemProperties() throws Exception
     {
         factory.setFile(SYSTEM_PROPS_FILE);
-        CombinedConfiguration cc = factory.getConfiguration(true);
+        factory.getConfiguration(true);
         String value = System.getProperty("key1");
         assertNotNull("The test key was not located", value);
         assertEquals("Incorrect value retrieved","value1",value);
@@ -831,7 +831,7 @@
     public void testValidation() throws Exception
     {
         factory.setFile(VALIDATION_FILE);
-        CombinedConfiguration cc = factory.getConfiguration(true);
+        factory.getConfiguration(true);
         String value = System.getProperty("key1");
         assertNotNull("The test key was not located", value);
         assertEquals("Incorrect value retrieved","value1",value);
@@ -840,7 +840,7 @@
     public void testMultiTenentConfiguration() throws Exception
     {
         factory.setFile(MULTI_TENENT_FILE);
-        System.clearProperty("Id");
+        System.getProperties().remove("Id");
 
         CombinedConfiguration config = factory.getConfiguration(true);
         assertTrue("Incorrect configuration", config instanceof DynamicCombinedConfiguration);



Mime
View raw message