commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From s...@apache.org
Subject svn commit: r903778 - /commons/proper/digester/trunk/src/test/org/apache/commons/digester/
Date Wed, 27 Jan 2010 18:28:34 GMT
Author: sebb
Date: Wed Jan 27 18:28:33 2010
New Revision: 903778

URL: http://svn.apache.org/viewvc?rev=903778&view=rev
Log:
Tidy up various Eclipse warnings

Modified:
    commons/proper/digester/trunk/src/test/org/apache/commons/digester/BeanPropertySetterRuleTestCase.java
    commons/proper/digester/trunk/src/test/org/apache/commons/digester/NodeCreateRuleTestCase.java
    commons/proper/digester/trunk/src/test/org/apache/commons/digester/SetNestedPropertiesRuleTestCase.java
    commons/proper/digester/trunk/src/test/org/apache/commons/digester/SetPropertiesRuleTestCase.java
    commons/proper/digester/trunk/src/test/org/apache/commons/digester/SetPropertyRuleTestCase.java
    commons/proper/digester/trunk/src/test/org/apache/commons/digester/URLTestCase.java

Modified: commons/proper/digester/trunk/src/test/org/apache/commons/digester/BeanPropertySetterRuleTestCase.java
URL: http://svn.apache.org/viewvc/commons/proper/digester/trunk/src/test/org/apache/commons/digester/BeanPropertySetterRuleTestCase.java?rev=903778&r1=903777&r2=903778&view=diff
==============================================================================
--- commons/proper/digester/trunk/src/test/org/apache/commons/digester/BeanPropertySetterRuleTestCase.java
(original)
+++ commons/proper/digester/trunk/src/test/org/apache/commons/digester/BeanPropertySetterRuleTestCase.java
Wed Jan 27 18:28:33 2010
@@ -377,7 +377,7 @@
     /**
      * Get input stream from {@link #TEST_XML}.
      */
-    private Reader xmlTestReader() throws IOException {
+    private Reader xmlTestReader() {
         return new StringReader(TEST_XML);
     }
 

Modified: commons/proper/digester/trunk/src/test/org/apache/commons/digester/NodeCreateRuleTestCase.java
URL: http://svn.apache.org/viewvc/commons/proper/digester/trunk/src/test/org/apache/commons/digester/NodeCreateRuleTestCase.java?rev=903778&r1=903777&r2=903778&view=diff
==============================================================================
--- commons/proper/digester/trunk/src/test/org/apache/commons/digester/NodeCreateRuleTestCase.java
(original)
+++ commons/proper/digester/trunk/src/test/org/apache/commons/digester/NodeCreateRuleTestCase.java
Wed Jan 27 18:28:33 2010
@@ -125,8 +125,7 @@
      * Tests simple element construction, using the {@link #TEST_XML}
      * XML input data.
      */
-    public void testInvalidNodeTypes()
-        throws SAXException, ParserConfigurationException, IOException {
+    public void testInvalidNodeTypes() throws Exception {
 
         try {
             Rule rule = new NodeCreateRule(Node.ATTRIBUTE_NODE);
@@ -290,7 +289,7 @@
         Object result = digester.parse(getInputStream("Test4.xml"));
 
         assertNotNull(result);
-        assertTrue(result instanceof List);
+        assertTrue(result instanceof List<?>);
         List<?> list = (List<?>)result;
         assertEquals(2, list.size());
 

Modified: commons/proper/digester/trunk/src/test/org/apache/commons/digester/SetNestedPropertiesRuleTestCase.java
URL: http://svn.apache.org/viewvc/commons/proper/digester/trunk/src/test/org/apache/commons/digester/SetNestedPropertiesRuleTestCase.java?rev=903778&r1=903777&r2=903778&view=diff
==============================================================================
--- commons/proper/digester/trunk/src/test/org/apache/commons/digester/SetNestedPropertiesRuleTestCase.java
(original)
+++ commons/proper/digester/trunk/src/test/org/apache/commons/digester/SetNestedPropertiesRuleTestCase.java
Wed Jan 27 18:28:33 2010
@@ -527,7 +527,7 @@
     /**
      * Get input stream from {@link #TEST_XML}.
      */
-    private Reader xmlTestReader() throws IOException {
+    private Reader xmlTestReader() {
         return new StringReader(TEST_XML);
     }
 

Modified: commons/proper/digester/trunk/src/test/org/apache/commons/digester/SetPropertiesRuleTestCase.java
URL: http://svn.apache.org/viewvc/commons/proper/digester/trunk/src/test/org/apache/commons/digester/SetPropertiesRuleTestCase.java?rev=903778&r1=903777&r2=903778&view=diff
==============================================================================
--- commons/proper/digester/trunk/src/test/org/apache/commons/digester/SetPropertiesRuleTestCase.java
(original)
+++ commons/proper/digester/trunk/src/test/org/apache/commons/digester/SetPropertiesRuleTestCase.java
Wed Jan 27 18:28:33 2010
@@ -20,7 +20,6 @@
 package org.apache.commons.digester;
 
 
-import java.io.IOException;
 import java.io.Reader;
 import java.io.StringReader;
 
@@ -247,7 +246,7 @@
     /**
      * Get input stream from specified String containing XML data.
      */
-    private Reader xmlTestReader(String xml) throws IOException {
+    private Reader xmlTestReader(String xml) {
         return new StringReader(xml);
     }
 

Modified: commons/proper/digester/trunk/src/test/org/apache/commons/digester/SetPropertyRuleTestCase.java
URL: http://svn.apache.org/viewvc/commons/proper/digester/trunk/src/test/org/apache/commons/digester/SetPropertyRuleTestCase.java?rev=903778&r1=903777&r2=903778&view=diff
==============================================================================
--- commons/proper/digester/trunk/src/test/org/apache/commons/digester/SetPropertyRuleTestCase.java
(original)
+++ commons/proper/digester/trunk/src/test/org/apache/commons/digester/SetPropertyRuleTestCase.java
Wed Jan 27 18:28:33 2010
@@ -20,7 +20,6 @@
 package org.apache.commons.digester;
 
 
-import java.io.IOException;
 import java.io.Reader;
 import java.io.StringReader;
 import java.lang.reflect.InvocationTargetException;
@@ -199,7 +198,7 @@
     /**
      * Get input stream from specified String containing XML data.
      */
-    private Reader xmlTestReader(String xml) throws IOException {
+    private Reader xmlTestReader(String xml) {
         return new StringReader(xml);
     }
 
@@ -215,6 +214,7 @@
         digester.addSetProperty("root/set", "name", "value");
 
         // Parse the input - should not throw an exception
+        @SuppressWarnings("unused")
         SimpleTestBean bean = (SimpleTestBean) digester.parse(xmlTestReader(TEST_XML_3));
     } 
 

Modified: commons/proper/digester/trunk/src/test/org/apache/commons/digester/URLTestCase.java
URL: http://svn.apache.org/viewvc/commons/proper/digester/trunk/src/test/org/apache/commons/digester/URLTestCase.java?rev=903778&r1=903777&r2=903778&view=diff
==============================================================================
--- commons/proper/digester/trunk/src/test/org/apache/commons/digester/URLTestCase.java (original)
+++ commons/proper/digester/trunk/src/test/org/apache/commons/digester/URLTestCase.java Wed
Jan 27 18:28:33 2010
@@ -129,8 +129,6 @@
     // Test parsing a resource, using a registered DTD, both passed with URLs
     public void testResource() throws Exception {
 
-        Object root = null;
-
         // Register the Digester Rules DTD
         URL dtd = URLTestCase.class.getResource(DIGESTER_RULES_SYSTEM_ID);
         assertNotNull(dtd);
@@ -140,8 +138,8 @@
         // the same Digester instance
         URL xml = URLTestCase.class.getResource(TEST_INPUT_SYSTEM_ID);
         assertNotNull(xml);
-        root = digester.parse(xml);
-        root = digester.parse(xml);
+        digester.parse(xml);
+        digester.parse(xml);
 
     }
 



Mime
View raw message