commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From s...@apache.org
Subject svn commit: r754493 - in /commons/proper/lang/trunk/src/test/org/apache/commons/lang: CharRangeTest.java StringUtilsTest.java builder/EqualsBuilderTest.java builder/ReflectionToStringBuilderExcludeTest.java exception/AbstractNestableTest.java
Date Sat, 14 Mar 2009 17:01:21 GMT
Author: sebb
Date: Sat Mar 14 17:01:21 2009
New Revision: 754493

URL: http://svn.apache.org/viewvc?rev=754493&view=rev
Log:
Suppress warnings for unread/unused fields

Modified:
    commons/proper/lang/trunk/src/test/org/apache/commons/lang/CharRangeTest.java
    commons/proper/lang/trunk/src/test/org/apache/commons/lang/StringUtilsTest.java
    commons/proper/lang/trunk/src/test/org/apache/commons/lang/builder/EqualsBuilderTest.java
    commons/proper/lang/trunk/src/test/org/apache/commons/lang/builder/ReflectionToStringBuilderExcludeTest.java
    commons/proper/lang/trunk/src/test/org/apache/commons/lang/exception/AbstractNestableTest.java

Modified: commons/proper/lang/trunk/src/test/org/apache/commons/lang/CharRangeTest.java
URL: http://svn.apache.org/viewvc/commons/proper/lang/trunk/src/test/org/apache/commons/lang/CharRangeTest.java?rev=754493&r1=754492&r2=754493&view=diff
==============================================================================
--- commons/proper/lang/trunk/src/test/org/apache/commons/lang/CharRangeTest.java (original)
+++ commons/proper/lang/trunk/src/test/org/apache/commons/lang/CharRangeTest.java Sat Mar
14 17:01:21 2009
@@ -356,6 +356,7 @@
     public void testContainsNullArg() {
         CharRange range = new CharRange('a');
         try {
+            @SuppressWarnings("unused")
             boolean contains = range.contains(null);
         } catch(IllegalArgumentException e) {
             assertEquals("The Range must not be null", e.getMessage());

Modified: commons/proper/lang/trunk/src/test/org/apache/commons/lang/StringUtilsTest.java
URL: http://svn.apache.org/viewvc/commons/proper/lang/trunk/src/test/org/apache/commons/lang/StringUtilsTest.java?rev=754493&r1=754492&r2=754493&view=diff
==============================================================================
--- commons/proper/lang/trunk/src/test/org/apache/commons/lang/StringUtilsTest.java (original)
+++ commons/proper/lang/trunk/src/test/org/apache/commons/lang/StringUtilsTest.java Sat Mar
14 17:01:21 2009
@@ -1651,12 +1651,14 @@
         assertEquals(8, StringUtils.getLevenshteinDistance("zzzzzzzz", "hippo") );
         assertEquals(1, StringUtils.getLevenshteinDistance("hello", "hallo") );
         try {
+            @SuppressWarnings("unused")
             int d = StringUtils.getLevenshteinDistance("a", null);
             fail("expecting IllegalArgumentException");
         } catch (IllegalArgumentException ex) {
             // empty
         }
         try {
+            @SuppressWarnings("unused")
             int d = StringUtils.getLevenshteinDistance(null, "a");
             fail("expecting IllegalArgumentException");
         } catch (IllegalArgumentException ex) {

Modified: commons/proper/lang/trunk/src/test/org/apache/commons/lang/builder/EqualsBuilderTest.java
URL: http://svn.apache.org/viewvc/commons/proper/lang/trunk/src/test/org/apache/commons/lang/builder/EqualsBuilderTest.java?rev=754493&r1=754492&r2=754493&view=diff
==============================================================================
--- commons/proper/lang/trunk/src/test/org/apache/commons/lang/builder/EqualsBuilderTest.java
(original)
+++ commons/proper/lang/trunk/src/test/org/apache/commons/lang/builder/EqualsBuilderTest.java
Sat Mar 14 17:01:21 2009
@@ -126,6 +126,7 @@
     }
 
     static class TestTSubObject extends TestObject {
+        @SuppressWarnings("unused")
         private transient int t;
         public TestTSubObject(int a, int t) {
             super(a);
@@ -134,6 +135,7 @@
     }
 
     static class TestTTSubObject extends TestTSubObject {
+        @SuppressWarnings("unused")
         private transient int tt;
         public TestTTSubObject(int a, int t, int tt) {
             super(a, t);
@@ -142,6 +144,7 @@
     }
 
     static class TestTTLeafObject extends TestTTSubObject {
+        @SuppressWarnings("unused")
         private int leafValue;
         public TestTTLeafObject(int a, int t, int tt, int leafValue) {
             super(a, t, tt);
@@ -998,8 +1001,11 @@
     }
 
     static class TestObjectWithMultipleFields {
+        @SuppressWarnings("unused")
         private TestObject one;
+        @SuppressWarnings("unused")
         private TestObject two;
+        @SuppressWarnings("unused")
         private TestObject three;
 
         public TestObjectWithMultipleFields(int one, int two, int three) {

Modified: commons/proper/lang/trunk/src/test/org/apache/commons/lang/builder/ReflectionToStringBuilderExcludeTest.java
URL: http://svn.apache.org/viewvc/commons/proper/lang/trunk/src/test/org/apache/commons/lang/builder/ReflectionToStringBuilderExcludeTest.java?rev=754493&r1=754492&r2=754493&view=diff
==============================================================================
--- commons/proper/lang/trunk/src/test/org/apache/commons/lang/builder/ReflectionToStringBuilderExcludeTest.java
(original)
+++ commons/proper/lang/trunk/src/test/org/apache/commons/lang/builder/ReflectionToStringBuilderExcludeTest.java
Sat Mar 14 17:01:21 2009
@@ -33,8 +33,10 @@
 public class ReflectionToStringBuilderExcludeTest extends TestCase {
 
     class TestFixture {
+        @SuppressWarnings("unused")
         private String secretField = SECRET_VALUE;
 
+        @SuppressWarnings("unused")
         private String showField = NOT_SECRET_VALUE;
     }
 

Modified: commons/proper/lang/trunk/src/test/org/apache/commons/lang/exception/AbstractNestableTest.java
URL: http://svn.apache.org/viewvc/commons/proper/lang/trunk/src/test/org/apache/commons/lang/exception/AbstractNestableTest.java?rev=754493&r1=754492&r2=754493&view=diff
==============================================================================
--- commons/proper/lang/trunk/src/test/org/apache/commons/lang/exception/AbstractNestableTest.java
(original)
+++ commons/proper/lang/trunk/src/test/org/apache/commons/lang/exception/AbstractNestableTest.java
Sat Mar 14 17:01:21 2009
@@ -169,6 +169,7 @@
         // Test for index out of bounds
         try
         {
+            @SuppressWarnings("unused")
             String msg = ne.getMessage(-1);
             fail("getMessage(-1) should have thrown IndexOutOfBoundsException");
         }
@@ -177,6 +178,7 @@
         }
         try
         {
+            @SuppressWarnings("unused")
             String msg = ne.getMessage(msgs.length + 100);
             fail("getMessage(999) should have thrown IndexOutOfBoundsException");
         }
@@ -429,6 +431,7 @@
         // Test for index out of bounds
         try
         {
+            @SuppressWarnings("unused")
             int index = n.indexOfThrowable(getTester1Class(), -1);
             fail("method should have thrown IndexOutOfBoundsException");
         }
@@ -437,6 +440,7 @@
         }
         try
         {
+            @SuppressWarnings("unused")
             int index = n.indexOfThrowable(getTester1Class(), 5);
             fail("method should have thrown IndexOutOfBoundsException");
         }



Mime
View raw message