RFR 8179292: a number of launcher tests fail when run with --limit-modules due to CNFE: javax.tools.ToolProvider

classic Classic list List threaded Threaded
9 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

RFR 8179292: a number of launcher tests fail when run with --limit-modules due to CNFE: javax.tools.ToolProvider

Andrey Nazarov
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: RFR 8179292: a number of launcher tests fail when run with --limit-modules due to CNFE: javax.tools.ToolProvider

Andrey Nazarov
Can anyone look?

—Thanks,
Andrei

> On 21 Jul 2017, at 18:35, Andrey Nazarov <[hidden email]> 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/>
> JBS: https://bugs.openjdk.java.net/browse/JDK-8179292
>
> —Andrei

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: RFR 8179292: a number of launcher tests fail when run with --limit-modules due to CNFE: javax.tools.ToolProvider

Mandy Chung
In reply to this post by Andrey Nazarov

> On Jul 21, 2017, at 6:35 PM, Andrey Nazarov <[hidden email]> 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/>

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
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: RFR 8179292: a number of launcher tests fail when run with --limit-modules due to CNFE: javax.tools.ToolProvider

Andrey Nazarov
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/>

—Andrei

> On 25 Jul 2017, at 16:12, Mandy Chung <[hidden email]> wrote:
>
>
>> On Jul 21, 2017, at 6:35 PM, Andrey Nazarov <[hidden email]> 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/>
>
> 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

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: RFR 8179292: a number of launcher tests fail when run with --limit-modules due to CNFE: javax.tools.ToolProvider

Mandy Chung

> On Jul 25, 2017, at 5:29 PM, Andrey Nazarov <[hidden email]> 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 <[hidden email] <mailto:[hidden email]>> wrote:
>>
>>
>>> On Jul 21, 2017, at 6:35 PM, Andrey Nazarov <[hidden email] <mailto:[hidden email]>> 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
>

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: RFR 8179292: a number of launcher tests fail when run with --limit-modules due to CNFE: javax.tools.ToolProvider

Andrey Nazarov

> On 25 Jul 2017, at 18:01, Mandy Chung <[hidden email]> wrote:
>
>
>> On Jul 25, 2017, at 5:29 PM, Andrey Nazarov <[hidden email] <mailto:[hidden email]>> 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);
Updated by this line. http://cr.openjdk.java.net/~anazarov/JDK-8179292/webrev.02/webrev/ <http://cr.openjdk.java.net/~anazarov/JDK-8179292/webrev.02/webrev/>

> 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 <[hidden email] <mailto:[hidden email]>> wrote:
>>>
>>>
>>>> On Jul 21, 2017, at 6:35 PM, Andrey Nazarov <[hidden email] <mailto:[hidden email]>> 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
>>
>

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: RFR 8179292: a number of launcher tests fail when run with --limit-modules due to CNFE: javax.tools.ToolProvider

Mandy Chung

> On Jul 25, 2017, at 6:18 PM, Andrey Nazarov <[hidden email]> wrote:
>
>
> Updated by this line. http://cr.openjdk.java.net/~anazarov/JDK-8179292/webrev.02/webrev/ <http://cr.openjdk.java.net/~anazarov/JDK-8179292/webrev.02/webrev/>


Looks good.

Mandy

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: RFR 8179292: a number of launcher tests fail when run with --limit-modules due to CNFE: javax.tools.ToolProvider

Andrey Nazarov
Thank you!

> On 25 Jul 2017, at 18:20, Mandy Chung <[hidden email]> wrote:
>
>
>> On Jul 25, 2017, at 6:18 PM, Andrey Nazarov <[hidden email] <mailto:[hidden email]>> wrote:
>>
>>
>> Updated by this line. http://cr.openjdk.java.net/~anazarov/JDK-8179292/webrev.02/webrev/ <http://cr.openjdk.java.net/~anazarov/JDK-8179292/webrev.02/webrev/>
>
>
> Looks good.
>
> Mandy
>

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: RFR 8179292: a number of launcher tests fail when run with --limit-modules due to CNFE: javax.tools.ToolProvider

Kumar Srinivasan
+1

Kumar

On 7/25/2017 6:30 PM, Andrey Nazarov wrote:

> Thank you!
>> On 25 Jul 2017, at 18:20, Mandy Chung <[hidden email]> wrote:
>>
>>
>>> On Jul 25, 2017, at 6:18 PM, Andrey Nazarov <[hidden email] <mailto:[hidden email]>> wrote:
>>>
>>>
>>> Updated by this line. http://cr.openjdk.java.net/~anazarov/JDK-8179292/webrev.02/webrev/ <http://cr.openjdk.java.net/~anazarov/JDK-8179292/webrev.02/webrev/>
>>
>> Looks good.
>>
>> Mandy
>>

Loading...