googleapis/google-cloud-java
Auf GitHub ansehen[java-spanner] test: OptionsTest checks for fixed values being returned from hashCode()
Open
#12.268 geöffnet am 3. Nov. 2020
api: spannergood first issuehelp wantedtype: cleanup
Repository-Metriken
- Stars
- (1.763 Stars)
- PR-Merge-Metriken
- (Durchschn. Merge 2T 21h) (145 gemergte PRs in 30 T)
Beschreibung
The Options#hashCode() method does not guarantee to return a fixed value that is equal on all JVM's (at least; the documentation does not guarantee it). In reality it does, because the current implementation only uses hash codes that are guaranteed to be equal on all JVM's. The method should either be documented to have this behavior, or these tests should be replaced with tests that assert that the hashCode and equals methods comply with the general contract regarding these methods.