Re: trySetAccessible​

2017-08-22 Thread Alan Bateman
On 16/08/2017 02:09, Russell Gold wrote: : but: method.getDeclaringClass().getModule().isOpen("java.io", callingClass.getModule()) -> true // which seems to say that it IS open to that particular unnamed module ?! As Mandy points out, isOpen(String) is used to test if a

Re: Jigsaw related questions emerged during Java 9 Jigsaw Hack Day

2017-08-22 Thread Alan Bateman
On 14/08/2017 09:35, Oleg Tsal-Tsalko wrote: 2. Why compilation doesn’t fail in case several modules with same name put on module-path, but it only fails in runtime on startup ( https://github.com/AdoptOpenJDK/jdk9-jigsaw/tree/master/session-1-jigsaw-intro/08_ModulesExportConflict

Re: Allow ModuleInfoExtender to be used externally

2017-08-22 Thread Alan Bateman
On 10/08/2017 08:29, Oliver Siegmar wrote: On 8/9/17 7:35 PM, mandy chung wrote: ModuleInfoExtender is JDK internal API and not planned to be exported/opened. New version of ASM supports module-info.class. You can probably try out ASM 6 alpha version for now. Thank you for clarifying. So,

Re: """error: module testng reads package test from both test and testng"""

2017-08-22 Thread Martin Buchholz
Indeed, when I rerun the command with your suggested module-path, it works (I had never used "rerun" before). So why does my jtreg not make these modules available at runtime? This is a fairly ordinary Ubuntu 14.4 system. $ DISPLAY=localhost:10.0 \ HOME=/home/martin \ LANG=en_US.UTF-8 \

Re: """error: module testng reads package test from both test and testng"""

2017-08-22 Thread mandy chung
The error message is clear because testng is not found from the module path. Error occurred during initialization of boot layer java.lang.module.FindException: Module testng not found, required by test If you edit the rerun command from jtr file to add JTwork/modules to module path as follows:

Re: """error: module testng reads package test from both test and testng"""

2017-08-22 Thread Martin Buchholz
I also tried upgrading jcommander.jar to 1.72 from 1.48, but get the same error. Debugging hints? On Tue, Aug 22, 2017 at 4:28 PM, mandy chung wrote: > > On 8/22/17 3:52 PM, Martin Buchholz wrote: > > : > > > ACTION: testng -- Failed. Unexpected exit from test [exit

Re: """error: module testng reads package test from both test and testng"""

2017-08-22 Thread mandy chung
On 8/22/17 3:52 PM, Martin Buchholz wrote: : ACTION: testng -- Failed. Unexpected exit from test [exit code: 1] REASON: User specified action: run testng/othervm test/test.Main TIME:   0.215 seconds messages: command: testng test/test.Main reason: User specified action: run testng/othervm

Re: """error: module testng reads package test from both test and testng"""

2017-08-22 Thread Martin Buchholz
I tried updating my jtreg from testng 6.9.8 to 6.9.9 and got the insufficiently helpful Error occurred during initialization of boot layer java.lang.module.FindException: Module testng not found, required by test even though this new jtreg can run other testng tests successfully. Full log below:

Re: """error: module testng reads package test from both test and testng"""

2017-08-22 Thread mandy chung
On 8/22/17 2:55 PM, Martin Buchholz wrote: On Tue, Aug 22, 2017 at 12:38 PM, mandy chung > wrote: Does your testng.jar contain classes of package "test"?   I downloaded testng from maven which does not have the package "test".

Re: """error: module testng reads package test from both test and testng"""

2017-08-22 Thread Martin Buchholz
On Tue, Aug 22, 2017 at 12:38 PM, mandy chung wrote: > Does your testng.jar contain classes of package "test"? I downloaded > testng from maven which does not have the package "test". > Sorry, I missed that question. Yes, for historical reasons we are using testng

Re: """error: module testng reads package test from both test and testng"""

2017-08-22 Thread Martin Buchholz
Mandy, thanks for the investigation. On Tue, Aug 22, 2017 at 12:38 PM, mandy chung wrote: > > The testng.jar version I had bundled with jcommander classes and hence the > error message reports com.beust.jcommander.* packages from jcommander and > testng module. It was

Re: """error: module testng reads package test from both test and testng"""

2017-08-22 Thread mandy chung
Hi Martin, "error: module testng reads package test from both test and testng" indicates that a split package is detected.   Does your testng.jar contain classes of package "test"?   I downloaded testng from maven which does not have the package "test". The testng.jar version I had bundled

Re: trySetAccessible​

2017-08-22 Thread mandy chung
As described in the javadoc [1], Module::isOpen(String pn) returns true if this module has opened a package unconditionally. It returns true only if the module declares "opens pn;" unconditionally in module-info.java.  Since java.base does not open "java.io" unconditionally, so