Merge pull request #477 from candrews/patch-1

* patch-1:
  Fix SimpleKey equality with array argument
This commit is contained in:
Stephane Nicoll
2014-03-04 14:24:03 +01:00
2 changed files with 39 additions and 22 deletions

View File

@@ -50,12 +50,13 @@ public final class SimpleKey implements Serializable {
@Override
public boolean equals(Object obj) {
return (this == obj || (obj instanceof SimpleKey && Arrays.equals(this.params, ((SimpleKey) obj).params)));
return (this == obj || (obj instanceof SimpleKey
&& Arrays.deepEquals(this.params, ((SimpleKey) obj).params)));
}
@Override
public int hashCode() {
return Arrays.hashCode(this.params);
return Arrays.deepHashCode(this.params);
}
@Override