commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ohe...@apache.org
Subject svn commit: r759575 - in /commons/proper/configuration/trunk/src/test/org/apache/commons/configuration: TestVFSConfigurationBuilder.java TestWebdavConfigurationBuilder.java
Date Sat, 28 Mar 2009 20:18:55 GMT
Author: oheger
Date: Sat Mar 28 20:18:55 2009
New Revision: 759575

URL: http://svn.apache.org/viewvc?rev=759575&view=rev
Log:
Some smaller fixes:
- System.clearProperty() is not available in JDK 1.3/1.4.
- Removed unused imports and local variables.

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

Modified: commons/proper/configuration/trunk/src/test/org/apache/commons/configuration/TestVFSConfigurationBuilder.java
URL: http://svn.apache.org/viewvc/commons/proper/configuration/trunk/src/test/org/apache/commons/configuration/TestVFSConfigurationBuilder.java?rev=759575&r1=759574&r2=759575&view=diff
==============================================================================
--- commons/proper/configuration/trunk/src/test/org/apache/commons/configuration/TestVFSConfigurationBuilder.java
(original)
+++ commons/proper/configuration/trunk/src/test/org/apache/commons/configuration/TestVFSConfigurationBuilder.java
Sat Mar 28 20:18:55 2009
@@ -811,7 +811,7 @@
         Configuration config = cc.getConfiguration("xml");
         assertNotNull("Test configuration not present", config);
         assertTrue("Configuration is not ExtendedXMLConfiguration, is " +
-                config.getClass().getName(), 
+                config.getClass().getName(),
                 config instanceof TestDefaultConfigurationBuilder.ExtendedXMLConfiguration);
     }
 
@@ -827,7 +827,7 @@
     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);
@@ -837,7 +837,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);
@@ -846,7 +846,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);

Modified: commons/proper/configuration/trunk/src/test/org/apache/commons/configuration/TestWebdavConfigurationBuilder.java
URL: http://svn.apache.org/viewvc/commons/proper/configuration/trunk/src/test/org/apache/commons/configuration/TestWebdavConfigurationBuilder.java?rev=759575&r1=759574&r2=759575&view=diff
==============================================================================
--- commons/proper/configuration/trunk/src/test/org/apache/commons/configuration/TestWebdavConfigurationBuilder.java
(original)
+++ commons/proper/configuration/trunk/src/test/org/apache/commons/configuration/TestWebdavConfigurationBuilder.java
Sat Mar 28 20:18:55 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;
 
@@ -29,7 +29,6 @@
 import org.apache.commons.configuration.reloading.FileChangedReloadingStrategy;
 import org.apache.commons.configuration.tree.DefaultConfigurationNode;
 import org.apache.commons.configuration.tree.xpath.XPathExpressionEngine;
-import org.apache.commons.lang.text.StrLookup;
 
 /**
  * Test class for DefaultConfigurationBuilder.
@@ -812,7 +811,7 @@
     public void testSystemProperties() throws Exception
     {
         factory.setFileName(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);
@@ -822,7 +821,7 @@
     public void testValidation() throws Exception
     {
         factory.setFileName(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);
@@ -831,7 +830,7 @@
     public void testMultiTenentConfiguration() throws Exception
     {
         factory.setFileName(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