diff --git a/src/com/facebook/buck/ide/intellij/model/folders/IjFolder.java b/src/com/facebook/buck/ide/intellij/model/folders/IjFolder.java index c4ddac9e40a..8815e06544f 100644 --- a/src/com/facebook/buck/ide/intellij/model/folders/IjFolder.java +++ b/src/com/facebook/buck/ide/intellij/model/folders/IjFolder.java @@ -115,7 +115,8 @@ public boolean equals(Object other) { } IjFolder otherFolder = (IjFolder) other; - return getPath().equals(otherFolder.getPath()) + return (hashCode() == otherFolder.hashCode()) + && getPath().equals(otherFolder.getPath()) && (getWantsPackagePrefix() == otherFolder.getWantsPackagePrefix()) && getInputs().equals(otherFolder.getInputs()); } @@ -123,8 +124,8 @@ public boolean equals(Object other) { @Override public int hashCode() { return (getPath().hashCode() << 31) - | (getWantsPackagePrefix() ? 0x8000 : 0) - | inputs.hashCode(); + ^ (getWantsPackagePrefix() ? 0x8000 : 0) + ^ inputs.hashCode(); } @Override