Skip to content

Commit

Permalink
BlazePackageSearchScope: Override correct method for hashcode impleme…
Browse files Browse the repository at this point in the history
…ntation

SearchScope.hashcode() is marked as being non-extendable. According to the
Javadoc description, calcHashCode() should instead be overridden to provide
a custom hashcode implementation whose result can be cache. Caching seems
to be necessary for performance reasons especially for Kotlin projects
(see commit message of the change in the IntelliJ platform:
JetBrains/intellij-community@ecc334d).

This issue was flagged by the IntelliJ Plugin Verifier.

PiperOrigin-RevId: 357726823
  • Loading branch information
alice-ks authored and copybara-github committed Feb 16, 2021
1 parent f4247fb commit b827ee3
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ public boolean equals(Object obj) {
}

@Override
public int hashCode() {
public int calcHashCode() {
return Objects.hash(blazePackage, onlyBlazeFiles);
}

Expand Down

0 comments on commit b827ee3

Please sign in to comment.