/** * {@inheritDoc} */ @Override public boolean equals(Object o) { if (o instanceof RemoteFrameworkConnectionInfo) { RemoteFrameworkConnectionInfo other = (RemoteFrameworkConnectionInfo) o; if (!getHost().equals(other.getHost())) { return false; } if (getPort() != other.getPort()) { return false; } if (getUseSSL() != other.getUseSSL()) { return false; } if (!getTrustManagers().equals(other.getTrustManagers())) { return false; } if (!getKey().equals(other.getKey())) { return false; } if (getTimeout() != other.getTimeout()) { return false; } return true; } return false; }
/** * {@inheritDoc} */ @Override public boolean equals(Object o) { if (o instanceof RemoteFrameworkConnectionInfo) { RemoteFrameworkConnectionInfo other = (RemoteFrameworkConnectionInfo) o; if (!getHost().equals(other.getHost())) { return false; } if (getPort() != other.getPort()) { return false; } if (getUseSSL() != other.getUseSSL()) { return false; } if (!getTrustManagers().equals(other.getTrustManagers())) { return false; } if (!getKey().equals(other.getKey())) { return false; } if (getTimeout() != other.getTimeout()) { return false; } return true; } return false; }
return false; if (!getKey().equals(other.getKey())) { return false;
@Test public void testEquals() { GuardedString str1 = new GuardedString(); GuardedString str2 = new GuardedString(); assertEquals(str1, str2); str2.appendChar('2'); assertFalse(str1.equals(str2)); str1.appendChar('2'); assertEquals(str1, str2); }