JDK 13 RFR of core libs portions of JDK-8205626: Start of release updates for JDK 13
Joseph D. Darcy
joe.darcy at oracle.com
Wed Dec 12 01:32:10 UTC 2018
Hi Andrew,
Way back when JSR 269 which added the javax.lang.model API was running,
we did consider having a "LATEST" enum constant that would be an alias
for the most current release. In the end, we decided against this
approach and use a pair of "latest" methods on the SourceVersion enum to
provide analogous functionality.
The use of an enum value in an annotation has to be a compile-time
constant, which for enum-typed methods means the enum value has to be
referred directly as an enum constant, a final or static final variable
is not enough (JLS 9.7.1. Normal Annotations).
Therefore,
public static final CURRENT_RELEASE = SourceVersion.RELEASE_13;
would *not* allow
@SupportedSourceVersion(SourceVersion.CURRENT_RELEASE)
to be used.
Thanks,
-Joe
On 12/7/2018 6:18 PM, Andrew Luo wrote:
> Not a reviewer - looks good anyways - however, I would if some of those constants be refactored to fewer locations?
>
> For example, I see many copies of:
>
> @SupportedSourceVersion(SourceVersion.RELEASE_13)
>
> Perhaps if you declare SourceVersion as:
>
> RELEASE_12,
> RELEASE_13,
> CURRENT_RELEASE = RELEASE_13;
>
> Then you could use:
>
> @SupportedSourceVersion(SourceVersion.CURRENT_RELEASE)
>
> Thanks,
>
> -Andrew
>
> -----Original Message-----
> From: core-libs-dev <core-libs-dev-bounces at openjdk.java.net> On Behalf Of joe darcy
> Sent: Friday, December 7, 2018 9:52 AM
> To: Alan Bateman <Alan.Bateman at oracle.com>; Core-Libs-Dev <core-libs-dev at openjdk.java.net>
> Subject: Re: JDK 13 RFR of core libs portions of JDK-8205626: Start of release updates for JDK 13
>
> Hi Alan,
>
> On 12/7/2018 12:16 AM, Alan Bateman wrote:
>> On 07/12/2018 02:31, Joseph D. Darcy wrote:
>>> Hello,
>>>
>>> With the start of JDK 13 around the corner, please review the core
>>> libs portions of:
>>>
>>> JDK-8205626: Start of release updates for JDK 13
>>> http://cr.openjdk.java.net/~darcy/jdk13-fork.2
>>>
>>>
> [snip]
>
>> Looks okay (and the same as what we reviewed on build-dev yesterday?).
>>
> Yes, same changes as on build-dev (other than the update of several more TEST.ROOT files to require jtreg 4.2 b13 rather than b12.)
>
> I wanted to have a bit more of the testing complete before sending the core libs portion out for the review.
>
> Thanks,
>
> -Joe
>
More information about the core-libs-dev
mailing list