ditch HashCodeUtil, and use JDK Objects.hash() instead
[aaa.git] / aaa-shiro / impl / src / main / java / org / opendaylight / aaa / shiro / tokenauthrealm / auth / AuthenticationBuilder.java
index 94019ab89ce83363d0b5299006823005a5abbde7..93f3a1a79e9b6690b747a5bbaf42915dc75f4769 100644 (file)
@@ -8,11 +8,11 @@
 package org.opendaylight.aaa.shiro.tokenauthrealm.auth;
 
 import java.io.Serializable;
+import java.util.Objects;
 import java.util.Set;
 import org.opendaylight.aaa.api.Authentication;
 import org.opendaylight.aaa.api.Claim;
 import org.opendaylight.aaa.shiro.tokenauthrealm.util.EqualUtil;
-import org.opendaylight.aaa.shiro.tokenauthrealm.util.HashCodeUtil;
 
 /**
  * A builder for the authentication context.
@@ -108,10 +108,7 @@ public class AuthenticationBuilder {
         @Override
         public int hashCode() {
             if (hashCode == 0) {
-                int result = HashCodeUtil.SEED;
-                result = HashCodeUtil.hash(result, expiration);
-                result = HashCodeUtil.hash(result, claim.hashCode());
-                hashCode = result;
+                hashCode = Objects.hash(expiration, claim);
             }
             return hashCode;
         }