@Test public void equalsTest(){ SessionCredentials sessionCredentials=new SessionCredentials("RocketMQ","12345678"); sessionCredentials.setSecurityToken("abcd"); SessionCredentials other=new SessionCredentials("RocketMQ","12345678","abcd"); Assert.assertTrue(sessionCredentials.equals(other)); }
@Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (getClass() != obj.getClass()) return false; SessionCredentials other = (SessionCredentials) obj; if (accessKey == null) { if (other.accessKey != null) return false; } else if (!accessKey.equals(other.accessKey)) return false; if (secretKey == null) { if (other.secretKey != null) return false; } else if (!secretKey.equals(other.secretKey)) return false; if (signature == null) { if (other.signature != null) return false; } else if (!signature.equals(other.signature)) return false; return true; }
SessionCredentials { @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (getClass() != obj.getClass()) return false; SessionCredentials other = (SessionCredentials) obj; if (accessKey == null) { if (other.accessKey != null) return false; } else if (!accessKey.equals(other.accessKey)) return false; if (secretKey == null) { if (other.secretKey != null) return false; } else if (!secretKey.equals(other.secretKey)) return false; if (signature == null) { if (other.signature != null) return false; } else if (!signature.equals(other.signature)) return false; return true; } }
SessionCredentials { @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (getClass() != obj.getClass()) return false; SessionCredentials other = (SessionCredentials) obj; if (accessKey == null) { if (other.accessKey != null) return false; } else if (!accessKey.equals(other.accessKey)) return false; if (secretKey == null) { if (other.secretKey != null) return false; } else if (!secretKey.equals(other.secretKey)) return false; if (signature == null) { if (other.signature != null) return false; } else if (!signature.equals(other.signature)) return false; return true; } SessionCredentials();  SessionCredentials(String accessKey, String secretKey);  SessionCredentials(String accessKey, String secretKey, String securityToken); }
SessionCredentials { @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (getClass() != obj.getClass()) return false; SessionCredentials other = (SessionCredentials) obj; if (accessKey == null) { if (other.accessKey != null) return false; } else if (!accessKey.equals(other.accessKey)) return false; if (secretKey == null) { if (other.secretKey != null) return false; } else if (!secretKey.equals(other.secretKey)) return false; if (signature == null) { if (other.signature != null) return false; } else if (!signature.equals(other.signature)) return false; return true; } SessionCredentials();  SessionCredentials(String accessKey, String secretKey);  SessionCredentials(String accessKey, String secretKey, String securityToken); void updateContent(Properties prop); String getAccessKey(); void setAccessKey(String accessKey); String getSecretKey(); void setSecretKey(String secretKey); String getSignature(); void setSignature(String signature); String getSecurityToken(); void setSecurityToken(final String securityToken); @Override int hashCode(); @Override boolean equals(Object obj); @Override String toString(); }
SessionCredentials { @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (getClass() != obj.getClass()) return false; SessionCredentials other = (SessionCredentials) obj; if (accessKey == null) { if (other.accessKey != null) return false; } else if (!accessKey.equals(other.accessKey)) return false; if (secretKey == null) { if (other.secretKey != null) return false; } else if (!secretKey.equals(other.secretKey)) return false; if (signature == null) { if (other.signature != null) return false; } else if (!signature.equals(other.signature)) return false; return true; } SessionCredentials();  SessionCredentials(String accessKey, String secretKey);  SessionCredentials(String accessKey, String secretKey, String securityToken); void updateContent(Properties prop); String getAccessKey(); void setAccessKey(String accessKey); String getSecretKey(); void setSecretKey(String secretKey); String getSignature(); void setSignature(String signature); String getSecurityToken(); void setSecurityToken(final String securityToken); @Override int hashCode(); @Override boolean equals(Object obj); @Override String toString(); static final Charset CHARSET; static final String ACCESS_KEY; static final String SECRET_KEY; static final String SIGNATURE; static final String SECURITY_TOKEN; static final String KEY_FILE; }