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 93f80de5e..1f7e3ee57 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; 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 bce66a91f..4d77c6c0a 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; }