test: OptionsTest checks for fixed values being returned from hashCode() #577
Labels
api: spanner
Issues related to the googleapis/java-spanner API.
good first issue
This issue is a good place to started contributing to this repository.
help wanted
We'd love to have community involvement on this issue.
type: cleanup
An internal cleanup or hygiene concern.
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 thehashCode
andequals
methods comply with the general contract regarding these methods.The text was updated successfully, but these errors were encountered: