googleapis/google-cloud-java

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

开放

#12,268 创建于 2020年11月3日

 (0 条评论) (0 个反应) (0 位负责人)Java (1,082 个派生)batch import
api: spannergood first issuehelp wantedtype: cleanup

仓库指标

星标
 (1,763 个星标)
PR 合并指标
 (平均合并 5天 7小时) (30 天内合并 195 个 PR)

描述

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.

贡献者指南