googleapis/google-cloud-java

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

オープン

#12,268 opened on 2020/11/03

 (0 件のコメント) (0 件のリアクション) (0 人の担当者)Java (1,082 件のフォーク)batch import
api: spannergood first issuehelp wantedtype: cleanup

Repository metrics

Stars
 (1,763 個のスター)
PR merge metrics
 (平均マージ 5d 7h) (30d で 195 merged PRs)

説明

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.

コントリビューターガイド