RFR: 8254275: Development to revise ValueBased.html for consistency with inline class migration
Roger Riggs
rriggs at openjdk.java.net
Tue Oct 13 17:29:29 UTC 2020
On Tue, 13 Oct 2020 16:39:33 GMT, Mandy Chung <mchung at openjdk.org> wrote:
>> I was most concerned about the primitive wrapper classes, that are not currently specified to be value based (currently
>> do not have references to ValueBased.html or similar statements). The existing classes wrapper classes have some
>> explicit identity requirements in the JLS. Adding the @ValueBased annotation, with a javadoc reference to the updated
>> ValueBased.html would be a specification change. For JEP 390, the intention is to enable warnings, not to change the
>> specification. So either the @ValueBased annotation is weaker than a spec change or the link to ValueBased.html must
>> be a future aspirational statement, not a link to a current specification requirement.
>
>> For JEP 390, the intention is to enable warnings, not to change the specification.
> So either the @ValueBased annotation is weaker than a spec change or the link to ValueBased.html must be a future
> aspirational statement, not a link to a current specification requirement.
> I guess you may be concerning about the potential compatibility risks by this proposed spec change. Of course JEP 390
> can make spec change if discussed and agreed. There is no behavioral change to the primitive wrapper classes except
> the warnings are emitted if `synchronized` on these wrapper objects. @RogerRiggs can you clarify more what you are
> concerned about?
Yes, the compatibility concern is foremost. We don't intend to change the behavior (yet) so the exact language used to
describe what is being changed is important. A simple assertion that Integer is ValueBased breaks compatibility. The
JLS requirement for reference equality for small values is at odds with ValueBased.
-------------
PR: https://git.openjdk.java.net/valhalla/pull/222
More information about the valhalla-dev
mailing list