commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From s...@apache.org
Subject svn commit: r754519 - in /commons/proper/lang/trunk/src/test/org/apache/commons/lang: ArrayUtilsRemoveTest.java ArrayUtilsTest.java builder/CompareToBuilderTest.java
Date Sat, 14 Mar 2009 21:00:28 GMT
Author: sebb
Date: Sat Mar 14 21:00:26 2009
New Revision: 754519

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

Modified:
    commons/proper/lang/trunk/src/test/org/apache/commons/lang/ArrayUtilsRemoveTest.java
    commons/proper/lang/trunk/src/test/org/apache/commons/lang/ArrayUtilsTest.java
    commons/proper/lang/trunk/src/test/org/apache/commons/lang/builder/CompareToBuilderTest.java

Modified: commons/proper/lang/trunk/src/test/org/apache/commons/lang/ArrayUtilsRemoveTest.java
URL: http://svn.apache.org/viewvc/commons/proper/lang/trunk/src/test/org/apache/commons/lang/ArrayUtilsRemoveTest.java?rev=754519&r1=754518&r2=754519&view=diff
==============================================================================
--- commons/proper/lang/trunk/src/test/org/apache/commons/lang/ArrayUtilsRemoveTest.java (original)
+++ commons/proper/lang/trunk/src/test/org/apache/commons/lang/ArrayUtilsRemoveTest.java Sat
Mar 14 21:00:26 2009
@@ -365,6 +365,7 @@
         assertEquals(Character.TYPE, array.getClass().getComponentType());
     }
     
+    @SuppressWarnings("cast")
     public void testRemoveElementDoubleArray() {
         double[] array;
         array = ArrayUtils.removeElement((double[]) null, (double) 1);
@@ -383,6 +384,7 @@
         assertEquals(Double.TYPE, array.getClass().getComponentType());
     }
     
+    @SuppressWarnings("cast")
     public void testRemoveElementFloatArray() {
         float[] array;
         array = ArrayUtils.removeElement((float[]) null, (float) 1);
@@ -419,6 +421,7 @@
         assertEquals(Integer.TYPE, array.getClass().getComponentType());
     }
     
+    @SuppressWarnings("cast")
     public void testRemoveElementLongArray() {
         long[] array;
         array = ArrayUtils.removeElement((long[]) null, (long) 1);

Modified: commons/proper/lang/trunk/src/test/org/apache/commons/lang/ArrayUtilsTest.java
URL: http://svn.apache.org/viewvc/commons/proper/lang/trunk/src/test/org/apache/commons/lang/ArrayUtilsTest.java?rev=754519&r1=754518&r2=754519&view=diff
==============================================================================
--- commons/proper/lang/trunk/src/test/org/apache/commons/lang/ArrayUtilsTest.java (original)
+++ commons/proper/lang/trunk/src/test/org/apache/commons/lang/ArrayUtilsTest.java Sat Mar
14 21:00:26 2009
@@ -1716,6 +1716,7 @@
     }
     
     //-----------------------------------------------------------------------
+    @SuppressWarnings("cast")
     public void testIndexOfDouble() {
         double[] array = null;
         assertEquals(-1, ArrayUtils.indexOf(array, (double) 0));
@@ -1730,6 +1731,7 @@
         assertEquals(-1, ArrayUtils.indexOf(array, (double) 99));
     }
 
+    @SuppressWarnings("cast")
     public void testIndexOfDoubleTolerance() {
         double[] array = null;
         assertEquals(-1, ArrayUtils.indexOf(array, (double) 0, (double) 0));
@@ -1742,6 +1744,7 @@
         assertEquals(1, ArrayUtils.indexOf(array, (double) 1.00001324, (double) 0.0001));
     }
 
+    @SuppressWarnings("cast")
     public void testIndexOfDoubleWithStartIndex() {
         double[] array = null;
         assertEquals(-1, ArrayUtils.indexOf(array, (double) 0, 2));
@@ -1756,6 +1759,7 @@
         assertEquals(-1, ArrayUtils.indexOf(array, (double) 0, 6));
     }
     
+    @SuppressWarnings("cast")
     public void testIndexOfDoubleWithStartIndexTolerance() {
         double[] array = null;
         assertEquals(-1, ArrayUtils.indexOf(array, (double) 0, 2, (double) 0));
@@ -1772,6 +1776,7 @@
         assertEquals(1, ArrayUtils.indexOf(array, (double) 1.00001324, -300, (double) 0.0001));
     }
 
+    @SuppressWarnings("cast")
     public void testLastIndexOfDouble() {
         double[] array = null;
         assertEquals(-1, ArrayUtils.lastIndexOf(array, (double) 0));
@@ -1785,6 +1790,7 @@
         assertEquals(-1, ArrayUtils.lastIndexOf(array, (double) 99));
     }
 
+    @SuppressWarnings("cast")
     public void testLastIndexOfDoubleTolerance() {
         double[] array = null;
         assertEquals(-1, ArrayUtils.lastIndexOf(array, (double) 0, (double) 0));
@@ -1797,6 +1803,7 @@
         assertEquals(1, ArrayUtils.lastIndexOf(array, (double) 1.00001324, (double) 0.0001));
     }
 
+    @SuppressWarnings("cast")
     public void testLastIndexOfDoubleWithStartIndex() {
         double[] array = null;
         assertEquals(-1, ArrayUtils.lastIndexOf(array, (double) 0, 2));
@@ -1812,6 +1819,7 @@
         assertEquals(4, ArrayUtils.lastIndexOf(array, (double) 0, 88));
     }
 
+    @SuppressWarnings("cast")
     public void testLastIndexOfDoubleWithStartIndexTolerance() {
         double[] array = null;
         assertEquals(-1, ArrayUtils.lastIndexOf(array, (double) 0, 2, (double) 0));
@@ -1828,6 +1836,7 @@
         assertEquals(-1, ArrayUtils.lastIndexOf(array, (double) 4.15, -200, (double) 2.0));
     }
 
+    @SuppressWarnings("cast")
     public void testContainsDouble() {
         double[] array = null;
         assertEquals(false, ArrayUtils.contains(array, (double) 1));
@@ -1839,6 +1848,7 @@
         assertEquals(false, ArrayUtils.contains(array, (double) 99));
     }
 
+    @SuppressWarnings("cast")
     public void testContainsDoubleTolerance() {
         double[] array = null;
         assertEquals(false, ArrayUtils.contains(array, (double) 1, (double) 0));
@@ -1850,6 +1860,7 @@
     }
     
     //-----------------------------------------------------------------------
+    @SuppressWarnings("cast")
     public void testIndexOfFloat() {
         float[] array = null;
         assertEquals(-1, ArrayUtils.indexOf(array, (float) 0));
@@ -1863,6 +1874,7 @@
         assertEquals(-1, ArrayUtils.indexOf(array, (float) 99));
     }
 
+    @SuppressWarnings("cast")
     public void testIndexOfFloatWithStartIndex() {
         float[] array = null;
         assertEquals(-1, ArrayUtils.indexOf(array, (float) 0, 2));
@@ -1878,6 +1890,7 @@
         assertEquals(-1, ArrayUtils.indexOf(array, (float) 0, 6));
     }
 
+    @SuppressWarnings("cast")
     public void testLastIndexOfFloat() {
         float[] array = null;
         assertEquals(-1, ArrayUtils.lastIndexOf(array, (float) 0));
@@ -1891,6 +1904,7 @@
         assertEquals(-1, ArrayUtils.lastIndexOf(array, (float) 99));
     }
 
+    @SuppressWarnings("cast")
     public void testLastIndexOfFloatWithStartIndex() {
         float[] array = null;
         assertEquals(-1, ArrayUtils.lastIndexOf(array, (float) 0, 2));
@@ -1906,6 +1920,7 @@
         assertEquals(4, ArrayUtils.lastIndexOf(array, (float) 0, 88));
     }
 
+    @SuppressWarnings("cast")
     public void testContainsFloat() {
         float[] array = null;
         assertEquals(false, ArrayUtils.contains(array, (float) 1));

Modified: commons/proper/lang/trunk/src/test/org/apache/commons/lang/builder/CompareToBuilderTest.java
URL: http://svn.apache.org/viewvc/commons/proper/lang/trunk/src/test/org/apache/commons/lang/builder/CompareToBuilderTest.java?rev=754519&r1=754518&r2=754519&view=diff
==============================================================================
--- commons/proper/lang/trunk/src/test/org/apache/commons/lang/builder/CompareToBuilderTest.java
(original)
+++ commons/proper/lang/trunk/src/test/org/apache/commons/lang/builder/CompareToBuilderTest.java
Sat Mar 14 21:00:26 2009
@@ -110,6 +110,7 @@
     }
 
     static class TestTransientSubObject extends TestObject {
+        @SuppressWarnings("unused")
         private transient int t;
         public TestTransientSubObject(int a, int t) {
             super(a);



Mime
View raw message