commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ohe...@apache.org
Subject svn commit: r751494 - /commons/proper/configuration/branches/configuration2_experimental/src/test/java/org/apache/commons/configuration2/TestSubnodeConfiguration.java
Date Sun, 08 Mar 2009 18:29:32 GMT
Author: oheger
Date: Sun Mar  8 18:29:31 2009
New Revision: 751494

URL: http://svn.apache.org/viewvc?rev=751494&view=rev
Log:
Fixed some Eclipse and findbugs warnings.

Modified:
    commons/proper/configuration/branches/configuration2_experimental/src/test/java/org/apache/commons/configuration2/TestSubnodeConfiguration.java

Modified: commons/proper/configuration/branches/configuration2_experimental/src/test/java/org/apache/commons/configuration2/TestSubnodeConfiguration.java
URL: http://svn.apache.org/viewvc/commons/proper/configuration/branches/configuration2_experimental/src/test/java/org/apache/commons/configuration2/TestSubnodeConfiguration.java?rev=751494&r1=751493&r2=751494&view=diff
==============================================================================
--- commons/proper/configuration/branches/configuration2_experimental/src/test/java/org/apache/commons/configuration2/TestSubnodeConfiguration.java
(original)
+++ commons/proper/configuration/branches/configuration2_experimental/src/test/java/org/apache/commons/configuration2/TestSubnodeConfiguration.java
Sun Mar  8 18:29:31 2009
@@ -23,17 +23,11 @@
 import java.util.NoSuchElementException;
 import java.util.Set;
 
-import org.apache.commons.configuration2.Configuration;
-import org.apache.commons.configuration2.ConfigurationException;
-import org.apache.commons.configuration2.HierarchicalConfiguration;
-import org.apache.commons.configuration2.SubnodeConfiguration;
-import org.apache.commons.configuration2.XMLConfiguration;
-import org.apache.commons.configuration2.reloading.FileAlwaysReloadingStrategy;
+import junit.framework.TestCase;
+
 import org.apache.commons.configuration2.tree.ConfigurationNode;
 import org.apache.commons.configuration2.tree.xpath.XPathExpressionEngine;
 
-import junit.framework.TestCase;
-
 /**
  * Test case for SubnodeConfiguration.
  *
@@ -55,21 +49,16 @@
     /** Constant for a test output file.*/
     private static final File TEST_FILE = new File("target/test.xml");
 
-    /** Constant for an updated table name.*/
-    private static final String NEW_TABLE_NAME = "newTable";
-
     /** The parent configuration. */
     HierarchicalConfiguration parent;
 
     /** The subnode configuration to be tested. */
     SubnodeConfiguration config;
 
-    /** Stores the root node of the subnode config. */
-    ConfigurationNode subnode;
-
     /** Stores a counter for the created nodes. */
     int nodeCounter;
 
+    @Override
     protected void setUp() throws Exception
     {
         super.setUp();
@@ -77,12 +66,13 @@
         nodeCounter = 0;
     }
 
+    @Override
     protected void tearDown() throws Exception
     {
         // remove the test output file if necessary
         if (TEST_FILE.exists())
         {
-            TEST_FILE.delete();
+            assertTrue("Could not remove test file", TEST_FILE.delete());
         }
     }
 



Mime
View raw message