googleapis / googleapis/google-cloud-java

[java-spanner] test: OptionsTest checks for fixed values being returned from hashCode()

Aperta
#12,268 1 commento 0 reazioni 0 assegnatari Vedi su GitHub
api: spanner good first issue help wanted type: cleanup
Lingua principale
Java
Stelle
2.1k
Fork
1.2k
Merge medio
1g 23h
PR unite (30g)
154

Descrizione

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.

Guida per i contributori

Apri la guida per i contributori

Valutazione

Questa issue non è ancora stata valutata.

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.