googleapis / googleapis/google-cloud-java
[java-spanner] test: OptionsTest checks for fixed values being returned from hashCode()
未关闭
适合新手
api: spanner
good first issue
help wanted
type: cleanup
- 主要语言
- Java
- 星标
- 2.1k
- 派生
- 1.2k
- 平均合并
- 1 天 23 小时
- 30 天内合并 PR
- 157
描述
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.
贡献指南
调研方向
从 java-spanner's OptionsTest 和 Options#hashCode 实现开始。确定 fix 应记录跨 JVM 的固定值,还是应将对固定值的断言替换为针对通用 equals/hashCode 契约的测试。当所选行为已记录,或测试验证了该契约时,即完成。
由索引模型根据 Issue 内容生成。
评估
- 技术栈
- java
- 领域
- testing-qa
- Issue 类型
- 缺陷
- 难度
- 2/5
- 预计耗时
- 1-3 小时
- 活跃度
- 活跃
- 描述清晰度
- 基本清楚
- 新手友好度
- 65/100