JDK 12 RFR of JDK-8219254: Update explicit uses of latest source/target in langtools tests to a property

Jonathan Gibbons jonathan.gibbons at oracle.com
Tue Feb 19 19:51:20 UTC 2019


Joe,

I agree that seems preferable when it is reasonable to do so.

You may still need the ${jdk.version} on the command line when using 
jtreg @compile.

We will still need to update the diags/examples mechanisms.

-- Jon


On 02/19/2019 11:28 AM, Joe Darcy wrote:
> Hi Jon,
>
> As a general note, it occurred to me that when the current release 
> number is referred to inside the source of a test, rather than passing 
> it through the command line, it can instead be gotten programmatically 
> using code like:
>
>     Integer.toString(Runtime.version().feature())
>
> The start of JDK 12 updates included changes like this for the 
> libraries tests.
>
> If you agree this is preferable, I can revise the webrev to use this 
> technique where appropriate in the langtools tests.
>
> Thanks,
>
> -Joe
>
> On 2/19/2019 10:40 AM, Jonathan Gibbons wrote:
>>
>>
>> On 02/19/2019 10:23 AM, Joe Darcy wrote:
>>>
>>> Besides the future work files under diags/examples, after the 
>>> changes in the webrev, the remaining uses of "-source 13" are in
>>>
>>>     ./tools/javac/expswitch/ExpSwitchNestingTest.java
>>
>> Because this is a singleton file, it might be easiest to convert it 
>> to a "normal" jtreg test -- still using TestNG of course -- by 
>> removing the TEST.properties file, and using the standard test 
>> description tags, ending with `@run testng ...` to run the test.
>>
>> -- Jon



More information about the compiler-dev mailing list