forked from quarkusio/quarkus
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ArC: fix hash code of TypeAndQualifiers
The `TypeAndQualifiers` compound is used as a key in hash maps, which means its equality and hash code must be consistent. Unfortunately, the implementation of `equals()` is completely custom, because it needs to ignore `AnnotationInstance.target`, yet the `hashCode()` implementation blindly delegates to `AnnotationInstance`. That used to work, because `AnnotationInstance.hashCode()` ignored the `target` before, but that has never been a stated contract. A completely custom implementation of equality should always be accompanied by a custom implementation of hash code. That's what this commit does.
- Loading branch information
Showing
1 changed file
with
25 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters