commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pascalschumac...@apache.org
Subject [2/2] [lang] LANG-1279: Update Java requirement from Java 6 to 7
Date Fri, 28 Oct 2016 16:37:02 GMT
LANG-1279: Update Java requirement from Java 6 to 7

replace usage of deprecated ObjectUtils#hashCode with Objects#hashCode


Project: http://git-wip-us.apache.org/repos/asf/commons-lang/repo
Commit: http://git-wip-us.apache.org/repos/asf/commons-lang/commit/4733cb5b
Tree: http://git-wip-us.apache.org/repos/asf/commons-lang/tree/4733cb5b
Diff: http://git-wip-us.apache.org/repos/asf/commons-lang/diff/4733cb5b

Branch: refs/heads/master
Commit: 4733cb5b798cd72aed82a9118648b4a86c91539f
Parents: cfdc3f7
Author: pascalschumacher <pascalschumacher@gmx.net>
Authored: Fri Oct 28 18:36:51 2016 +0200
Committer: pascalschumacher <pascalschumacher@gmx.net>
Committed: Fri Oct 28 18:36:51 2016 +0200

----------------------------------------------------------------------
 src/main/java/org/apache/commons/lang3/reflect/TypeUtils.java  | 3 +--
 .../org/apache/commons/lang3/text/ExtendedMessageFormat.java   | 6 +++---
 2 files changed, 4 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/commons-lang/blob/4733cb5b/src/main/java/org/apache/commons/lang3/reflect/TypeUtils.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/commons/lang3/reflect/TypeUtils.java b/src/main/java/org/apache/commons/lang3/reflect/TypeUtils.java
index 93f80de..1f7e3ee 100644
--- a/src/main/java/org/apache/commons/lang3/reflect/TypeUtils.java
+++ b/src/main/java/org/apache/commons/lang3/reflect/TypeUtils.java
@@ -203,13 +203,12 @@ public class TypeUtils {
         /**
          * {@inheritDoc}
          */
-        @SuppressWarnings( "deprecation" )  // ObjectUtils.hashCode(Object) has been deprecated
in 3.2
         @Override
         public int hashCode() {
             int result = 71 << 4;
             result |= raw.hashCode();
             result <<= 4;
-            result |= ObjectUtils.hashCode(useOwner);
+            result |= Objects.hashCode(useOwner);
             result <<= 8;
             result |= Arrays.hashCode(typeArguments);
             return result;

http://git-wip-us.apache.org/repos/asf/commons-lang/blob/4733cb5b/src/main/java/org/apache/commons/lang3/text/ExtendedMessageFormat.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/commons/lang3/text/ExtendedMessageFormat.java b/src/main/java/org/apache/commons/lang3/text/ExtendedMessageFormat.java
index bce66a9..4d77c6c 100644
--- a/src/main/java/org/apache/commons/lang3/text/ExtendedMessageFormat.java
+++ b/src/main/java/org/apache/commons/lang3/text/ExtendedMessageFormat.java
@@ -24,6 +24,7 @@ import java.util.Collection;
 import java.util.Iterator;
 import java.util.Locale;
 import java.util.Map;
+import java.util.Objects;
 
 import org.apache.commons.lang3.ObjectUtils;
 import org.apache.commons.lang3.Validate;
@@ -284,12 +285,11 @@ public class ExtendedMessageFormat extends MessageFormat {
     /**
      * {@inheritDoc}
      */
-    @SuppressWarnings( "deprecation" ) // ObjectUtils.hashCode(Object) has been deprecated
in 3.2
     @Override
     public int hashCode() {
         int result = super.hashCode();
-        result = HASH_SEED * result + ObjectUtils.hashCode(registry);
-        result = HASH_SEED * result + ObjectUtils.hashCode(toPattern);
+        result = HASH_SEED * result + Objects.hashCode(registry);
+        result = HASH_SEED * result + Objects.hashCode(toPattern);
         return result;
     }
 


Mime
View raw message