On Wed, 3 Mar 2021 22:20:45 GMT, Joe Darcy <da...@openjdk.org> wrote:
> The class BigDecimal can be and sometimes is subclassed. The spec of > BigDecimal.hashCode is improved slightly by explicitly stating it is a > function of the unscaled value and the scale of the BigDecimal, the same > fields examined by equals. > > It is a conscious choice to *not* explicitly state what the exact hash > function is. > > As the behavior of hashCode is mostly implied from equals, I don't think a > CSR is necessary in this case. This pull request has now been integrated. Changeset: 28489389 Author: Joe Darcy <da...@openjdk.org> URL: https://git.openjdk.java.net/jdk/commit/28489389 Stats: 7 lines in 1 file changed: 5 ins; 0 del; 2 mod 8262927: Explicitly state fields examined for BigDecimal.hashCode Reviewed-by: bpb ------------- PR: https://git.openjdk.java.net/jdk/pull/2817