RFR: JDK-8196618: Create API to list supported values for javac --release option

Stuart Marks stuart.marks at oracle.com
Fri Jun 8 21:59:39 UTC 2018



On 6/8/18 6:51 AM, Jan Lahoda wrote:
> Thanks for your comments! I've updated the patch according to them (simplifying 
> the join, cleaning up the logic in tests, removing the tests from the list of 
> ignored tests). The updated patch is here:
> http://cr.openjdk.java.net/~jlahoda/8196618/webrev.01/

OK, the jdeprscan stuff looks good. Thanks for pulling the tests off the problem 
list, too. I assume that means they pass now!

(Note, I've only reviewed files in this changeset that are relevant to jdeprscan.)

>> In jdeprscan/Main.java there's a bit of ad-hoc logic to determine
>> whether a particular release is modular and whether it has the Java EE
>> modules. Offhand I can't think of a better way to do this, but maybe
>> this is something we can put in the back of our heads and think about a
>> bit.
> 
> I agree the logic there is a ad-hoc. I was thinking of using ALL-SYSTEM, but 
> that would mean updating the TraverseProc, probably taking all modules and using 
> those whose names start with "java.", so I decided to keep it similar to what 
> existed before. But I can try this, if you prefer.

No need for further changes right now. What you have is good enough. In the 
longer term maybe we'll do something different, but it's not obvious what at 
this point.

Thanks,

s'marks


> 
> Thanks,
>      Jan
> 
>>
>> For the help message, it turns out that String.join() consumes an
>> Iterable, so you can probably just do something like
>>
>>      String supportedReleases = String.join("|",
>> pp.getSupportedPlatformNames());
>>
>> instead of creating a Stream.
>>
>> For jdeprscan/TestRelease.java, why not just iterate over all supported
>> platform names, calling invoke() on each one? I'm not sure what the
>> filtering and "minimal coverage" logic is supposed to accomplish. If
>> they're not in the set of supported platforms, forcing "9" and "10"
>> seems likely to create an error. And we still want to test the old,
>> non-modular releases.
>>
>> Note further that TestRelease.java is currently on the problem list, so
>> it's not getting run at the moment. I'm ok if you go ahead with those
>> changes, as it doesn't matter much. I'll need to revisit this test at
>> some point anyway.
>>
>> s'marks
>>
>>
>> On 6/6/18 5:27 AM, Jan Lahoda wrote:
>>> Hi,
>>>
>>> This enhancement requests that test need to be able to query the list
>>> of supported --release options. This is possible using the
>>> JDKPlatformProvider, so I updated two tests where this seemed useful.
>>> But while doing this, it turned out the jdeprscan was not yet fully
>>> updated to JDK 11 (still refers to java.se.ee and did not list 11 in
>>> the help text for the --release option), so I updated that as well.
>>>
>>> Bug: https://bugs.openjdk.java.net/browse/JDK-8196618
>>> Webrev: http://cr.openjdk.java.net/~jlahoda/8196618/webrev.00/
>>>
>>> How does this look?
>>>
>>> Thanks,
>>>      Jan
>>>


More information about the compiler-dev mailing list