JDK-8234783 : Improve wording of spec of Record.equals
  • Type: Bug
  • Component: core-libs
  • Sub-Component: java.lang
  • Affected Version: 14
  • Priority: P3
  • Status: Closed
  • Resolution: Fixed
  • Submitted: 2019-11-26
  • Updated: 2020-05-27
  • Resolved: 2020-01-07
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 14 JDK 15
14 b31Fixed 15Fixed
Related Reports
Relates :  
Description
The java.lang.Record.equals spec could be clearer on how primitive values are handled.
Comments
URL: https://hg.openjdk.java.net/jdk/jdk14/rev/078325484932 User: darcy Date: 2020-01-07 18:23:17 +0000
07-01-2020

Review thread: http://mail.openjdk.java.net/pipermail/core-libs-dev/2020-January/064203.html
06-01-2020

[~darcy] I think we have added how primitives are handled as an implementation note in the spec, reproduced here: * The implicitly provided implementation returns {@code true} if and * only if the argument is an instance of the same record type as this object, * and each component of this record is equal to the corresponding component * of the argument, according to {@link java.util.Objects#equals(Object,Object)} * for components whose types are reference types, and according to the semantics * of the {@code equals} method on the corresponding primitive wrapper type. is this enough of do you consider that some further clarification is needed?
16-12-2019