Author: britter
Date: Sun Jan 12 18:53:16 2014
New Revision: 1557592

URL: http://svn.apache.org/r1557592
Log:
LANG-940: Fix deprecation warnings; found some more usages

Modified:
    
commons/proper/lang/trunk/src/main/java/org/apache/commons/lang3/ObjectUtils.java
    
commons/proper/lang/trunk/src/test/java/org/apache/commons/lang3/ObjectUtilsTest.java
    
commons/proper/lang/trunk/src/test/java/org/apache/commons/lang3/text/StrTokenizerTest.java

Modified: 
commons/proper/lang/trunk/src/main/java/org/apache/commons/lang3/ObjectUtils.java
URL: 
http://svn.apache.org/viewvc/commons/proper/lang/trunk/src/main/java/org/apache/commons/lang3/ObjectUtils.java?rev=1557592&r1=1557591&r2=1557592&view=diff
==============================================================================
--- 
commons/proper/lang/trunk/src/main/java/org/apache/commons/lang3/ObjectUtils.java
 (original)
+++ 
commons/proper/lang/trunk/src/main/java/org/apache/commons/lang3/ObjectUtils.java
 Sun Jan 12 18:53:16 2014
@@ -182,6 +182,7 @@ public class ObjectUtils {
      * @param object2  the second object, may be {@code null}
      * @return {@code false} if the values of both objects are the same
      */
+    @SuppressWarnings( "Deprecation" ) // ObjectUtils.equals(Object, Object) 
has been deprecated in 3.2
     public static boolean notEqual(final Object object1, final Object object2) 
{
         return ObjectUtils.equals(object1, object2) == false;
     }
@@ -239,7 +240,9 @@ public class ObjectUtils {
         int hash = 1;
         if (objects != null) {
             for (final Object object : objects) {
-                hash = hash * 31 + ObjectUtils.hashCode(object);
+                @SuppressWarnings( "Deprecation" ) // 
ObjectUtils.hashCode(Object) has been deprecated in 3.2
+                int tmpHash = ObjectUtils.hashCode(object);
+                hash = hash * 31 + tmpHash;
             }
         }
         return hash;

Modified: 
commons/proper/lang/trunk/src/test/java/org/apache/commons/lang3/ObjectUtilsTest.java
URL: 
http://svn.apache.org/viewvc/commons/proper/lang/trunk/src/test/java/org/apache/commons/lang3/ObjectUtilsTest.java?rev=1557592&r1=1557591&r2=1557592&view=diff
==============================================================================
--- 
commons/proper/lang/trunk/src/test/java/org/apache/commons/lang3/ObjectUtilsTest.java
 (original)
+++ 
commons/proper/lang/trunk/src/test/java/org/apache/commons/lang3/ObjectUtilsTest.java
 Sun Jan 12 18:53:16 2014
@@ -89,6 +89,7 @@ public class ObjectUtilsTest {
     }
 
     //-----------------------------------------------------------------------
+    @SuppressWarnings( "Deprecation" ) // ObjectUtils.equals(Object, Object) 
has been deprecated in 3.2
     @Test
     public void testEquals() {
         assertTrue("ObjectUtils.equals(null, null) returned false", 
ObjectUtils.equals(null, null));
@@ -107,6 +108,7 @@ public class ObjectUtilsTest {
         assertFalse("ObjectUtils.notEqual(\"foo\", \"foo\") returned false", 
ObjectUtils.notEqual(FOO, FOO));
     }
 
+    @SuppressWarnings( "Deprecation" ) // ObjectUtils.equals(Object, Object) 
has been deprecated in 3.2
     @Test
     public void testHashCode() {
         assertEquals(0, ObjectUtils.hashCode(null));

Modified: 
commons/proper/lang/trunk/src/test/java/org/apache/commons/lang3/text/StrTokenizerTest.java
URL: 
http://svn.apache.org/viewvc/commons/proper/lang/trunk/src/test/java/org/apache/commons/lang3/text/StrTokenizerTest.java?rev=1557592&r1=1557591&r2=1557592&view=diff
==============================================================================
--- 
commons/proper/lang/trunk/src/test/java/org/apache/commons/lang3/text/StrTokenizerTest.java
 (original)
+++ 
commons/proper/lang/trunk/src/test/java/org/apache/commons/lang3/text/StrTokenizerTest.java
 Sun Jan 12 18:53:16 2014
@@ -46,6 +46,7 @@ public class StrTokenizerTest {
     }
 
     // -----------------------------------------------------------------------
+    @SuppressWarnings( "Deprecation" ) // ObjectUtils.equals(Object, Object) 
has been deprecated in 3.2
     @Test
     public void test1() {
 
@@ -67,6 +68,7 @@ public class StrTokenizerTest {
 
     }
 
+    @SuppressWarnings( "Deprecation" ) // ObjectUtils.equals(Object, Object) 
has been deprecated in 3.2
     @Test
     public void test2() {
 
@@ -88,6 +90,7 @@ public class StrTokenizerTest {
 
     }
 
+    @SuppressWarnings( "Deprecation" ) // ObjectUtils.equals(Object, Object) 
has been deprecated in 3.2
     @Test
     public void test3() {
 
@@ -109,6 +112,7 @@ public class StrTokenizerTest {
 
     }
 
+    @SuppressWarnings( "Deprecation" ) // ObjectUtils.equals(Object, Object) 
has been deprecated in 3.2
     @Test
     public void test4() {
 
@@ -130,6 +134,7 @@ public class StrTokenizerTest {
 
     }
 
+    @SuppressWarnings( "Deprecation" ) // ObjectUtils.equals(Object, Object) 
has been deprecated in 3.2
     @Test
     public void test5() {
 
@@ -188,6 +193,7 @@ public class StrTokenizerTest {
 
     }
 
+    @SuppressWarnings( "Deprecation" ) // ObjectUtils.equals(Object, Object) 
has been deprecated in 3.2
     @Test
     public void test7() {
 
@@ -209,6 +215,7 @@ public class StrTokenizerTest {
 
     }
 
+    @SuppressWarnings( "Deprecation" ) // ObjectUtils.equals(Object, Object) 
has been deprecated in 3.2
     @Test
     public void test8() {
 


Reply via email to