@Test public void testHashCode() { Authentication auth1 = new ComponentAuthentication( "key", new Component() ); Authentication auth2 = new ComponentAuthentication( "key", new Component() ); assertEquals( auth1.hashCode(), auth2.hashCode() ); }
@Override public int hashCode() { int hash = 17; hash = hash * 31 + key.hashCode(); hash = hash * 31 + ( ( value != null ) ? value.getClass().hashCode() : 0 ); return hash; }
ComponentAuthentication implements Authentication { @Override public int hashCode() { int hash = 17; hash = hash * 31 + key.hashCode(); hash = hash * 31 + ( ( value != null ) ? value.getClass().hashCode() : 0 ); return hash; } }
ComponentAuthentication implements Authentication { @Override public int hashCode() { int hash = 17; hash = hash * 31 + key.hashCode(); hash = hash * 31 + ( ( value != null ) ? value.getClass().hashCode() : 0 ); return hash; } ComponentAuthentication( String key, Object value ); }
ComponentAuthentication implements Authentication { @Override public int hashCode() { int hash = 17; hash = hash * 31 + key.hashCode(); hash = hash * 31 + ( ( value != null ) ? value.getClass().hashCode() : 0 ); return hash; } ComponentAuthentication( String key, Object value ); void fill( AuthenticationContext context, String key, Map<String, String> data ); void digest( AuthenticationDigest digest ); @Override boolean equals( Object obj ); @Override int hashCode(); @Override String toString(); }
ComponentAuthentication implements Authentication { @Override public int hashCode() { int hash = 17; hash = hash * 31 + key.hashCode(); hash = hash * 31 + ( ( value != null ) ? value.getClass().hashCode() : 0 ); return hash; } ComponentAuthentication( String key, Object value ); void fill( AuthenticationContext context, String key, Map<String, String> data ); void digest( AuthenticationDigest digest ); @Override boolean equals( Object obj ); @Override int hashCode(); @Override String toString();  }