mirror of
https://github.com/gyurix1968/guacamole-client.git
synced 2025-09-06 13:17:41 +00:00
Ticket #269: Removed equals() and hashCode() from MySQLConnection (now present in AbstractConnection).
This commit is contained in:
@@ -154,25 +154,6 @@ public class MySQLConnection extends AbstractConnection {
|
|||||||
return socket;
|
return socket;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public boolean equals(Object other) {
|
|
||||||
if(!(other instanceof MySQLConnection))
|
|
||||||
return false;
|
|
||||||
boolean idsAreEqual = ((MySQLConnection)other).getConnectionID() == this.getConnectionID();
|
|
||||||
// they are both new, check if they have the same name
|
|
||||||
if(idsAreEqual && this.getConnectionID() == 0)
|
|
||||||
return this.getIdentifier().equals(((MySQLConnection)other).getIdentifier());
|
|
||||||
return idsAreEqual;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public int hashCode() {
|
|
||||||
int hash = 7;
|
|
||||||
hash = 73 * hash + getConnectionID();
|
|
||||||
hash = 73 * hash + getIdentifier().hashCode();
|
|
||||||
return hash;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<? extends ConnectionRecord> getHistory() throws GuacamoleException {
|
public List<? extends ConnectionRecord> getHistory() throws GuacamoleException {
|
||||||
return Collections.unmodifiableList(history);
|
return Collections.unmodifiableList(history);
|
||||||
|
Reference in New Issue
Block a user