RFR 8179292: a number of launcher tests fail when run with --limit-modules due to CNFE: javax.tools.ToolProvider
Mandy Chung
mandy.chung at oracle.com
Wed Jul 26 01:01:45 UTC 2017
> On Jul 25, 2017, at 5:29 PM, Andrey Nazarov <andrey.x.nazarov at oracle.com> wrote:
>
> Thanks, Mandy
> I’ve updated patch http://cr.openjdk.java.net/~anazarov/JDK-8179292/webrev.01/webrev/ <http://cr.openjdk.java.net/~anazarov/JDK-8179292/webrev.01/webrev/>
>
Thanks for the update.
One suggestion: you could simply change line 133 to
compiler = java.util.spi.ToolProvider.findFirst("javac”).orElse(null);
Or, no need for saving the compiler but instead have getCompiler() to return:
return java.util.spi.ToolProvider.findFirst("javac”).orElseThrow(() ->
throw new RuntimeException(“javac not found”));
Mandy
> —Andrei
>> On 25 Jul 2017, at 16:12, Mandy Chung <mandy.chung at oracle.com <mailto:mandy.chung at oracle.com>> wrote:
>>
>>
>>> On Jul 21, 2017, at 6:35 PM, Andrey Nazarov <andrey.x.nazarov at oracle.com <mailto:andrey.x.nazarov at oracle.com>> wrote:
>>>
>>> Hi,
>>>
>>> Please review changes in launcher tests. I’ve added absent @modules jtreg tags.
>>>
>>> Review: http://cr.openjdk.java.net/~anazarov/JDK-8179292/webrev.00/webrev/ <http://cr.openjdk.java.net/~anazarov/JDK-8179292/webrev.00/webrev/> <http://cr.openjdk.java.net/~anazarov/JDK-8179292/webrev.00/webrev/ <http://cr.openjdk.java.net/~anazarov/JDK-8179292/webrev.00/webrev/>>
>>
>> A few tests only require java.compiler but not jdk.compiler. Maybe TestHelper should be updated to use java.util.spi.ToolProvider to find “javac” to avoid the dependency to java.compiler if no compiler is needed.
>>
>> test/tools/launcher/modules/upgrademodulepath/UpgradeModulePathTest.java
>> - can you keep @modules list in alphabetical order.
>>
>> Mandy
>
More information about the core-libs-dev
mailing list