LANG-1279: Update Java requirement from Java 6 to 7

replace usage of deprecated ObjectUtils#hashCode with Objects#hashCode
This commit is contained in:
pascalschumacher 2016-10-28 18:36:51 +02:00
parent cfdc3f767c
commit 4733cb5b79
2 changed files with 4 additions and 5 deletions

View File

@ -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;

View File

@ -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;
}