hg: jigsaw/jake/jdk: Add @apiNote in ClassLoader::getPackage(s) about platform class loader

2017-05-02 Thread mandy . chung
Changeset: fa1e20c4e6c1 Author:mchung Date: 2017-05-02 17:20 -0700 URL: http://hg.openjdk.java.net/jigsaw/jake/jdk/rev/fa1e20c4e6c1 Add @apiNote in ClassLoader::getPackage(s) about platform class loader ! src/java.base/share/classes/java/lang/ClassLoader.java

Re: Java Platform Module System

2017-05-02 Thread Alex Buckley
On 5/2/2017 7:07 AM, Jayaprakash Arthanareeswaran wrote: Chapter 2 in [1] describes context-free grammars. The addition to "3.9 Keywords" defines "restricted keywords", which prevent the grammar for ModuleDeclaration from being context-free. This prevents compilers from using common parser

Re: Java Platform Module System

2017-05-02 Thread Alex Buckley
On 5/2/2017 5:13 AM, Stephan Herrmann wrote: Thanks, Alex, for promising improvements in various places of the spec. Re: Multiple packages with the same name can be "visible" (helpful terminology for program analysis) but exactly one of these packages must be identified as the meaning of the

Re: [9] Review request: 8177566: FX user module gets IllegalAccessException from sun.reflect.misc.Trampoline

2017-05-02 Thread Mandy Chung
> On May 2, 2017, at 2:22 PM, Kevin Rushforth > wrote: > > Here is the message: > > IllegalAccessException: class com.sun.javafx.property.MethodHelper cannot > access class com.foo (in module foo.app) because module foo.app does not open > com.foo to javafx.base

Re: Review Request: JDK-8020801: Apply the restriction of invoking MethodHandles.lookup to j.l.r.Method.invoke

2017-05-02 Thread Mandy Chung
Hi Peter, Looking at it again, you are right that no need to skip inflation. The change is simplified. I have verified with and without -Dsun.reflect.noInflation=true. http://cr.openjdk.java.net/~mchung/jdk9/webrevs/8020801/webrev.01/ thanks Mandy > On May 2, 2017, at 1:17 PM, Peter

Re: [9] Review request: 8177566: FX user module gets IllegalAccessException from sun.reflect.misc.Trampoline

2017-05-02 Thread Kevin Rushforth
inline Mandy Chung wrote: Hi Kevin, On May 1, 2017, at 5:21 PM, Kevin Rushforth wrote: This review is being cross-posted to both openjfx-dev and jigsaw-dev. Please review the proposed fix for: https://bugs.openjdk.java.net/browse/JDK-8177566

Re: [9] Review request: 8177566: FX user module gets IllegalAccessException from sun.reflect.misc.Trampoline

2017-05-02 Thread Mandy Chung
Hi Kevin, > On May 1, 2017, at 5:21 PM, Kevin Rushforth > wrote: > > This review is being cross-posted to both openjfx-dev and jigsaw-dev. > > Please review the proposed fix for: > > https://bugs.openjdk.java.net/browse/JDK-8177566 >

Re: Accessing module internals from bytecode rewriting agent

2017-05-02 Thread Alan Bateman
On 02/05/2017 19:00, Remi Forax wrote: Hi Kirk, --patch-module both at compile time and at runtime is what your are looking for. Right, and more details in the "Patching module content" section of JEP 261 [1]. -Alan [1] http://openjdk.java.net/jeps/261#Patching-module-content

Re: 8178380: Module system implementation refresh (5/2017 update)

2017-05-02 Thread Alan Bateman
On 02/05/2017 20:21, stanislav lukyanov wrote: Hi Alan, In the Launcher-Agent-Class, would it make sense to use 'premain' instead of 'agentmain' to align it with Premain-Class rather than with Agent-Class? (maybe even rename Launcher-Agent-Class to Launcher-Premain-Class?) AFAIU

Re: Review Request: JDK-8020801: Apply the restriction of invoking MethodHandles.lookup to j.l.r.Method.invoke

2017-05-02 Thread Peter Levart
On 05/02/2017 06:56 PM, Mandy Chung wrote: On May 2, 2017, at 3:14 AM, Peter Levart wrote: I don't quite understand the need for bypassing the inflation of native into generated method accessor The VM native reflection implementation does not know about this

Re: [9] Review request: 8177566: FX user module gets IllegalAccessException from sun.reflect.misc.Trampoline

2017-05-02 Thread Kevin Rushforth
Is this any better? It adds an example module-info.java file to JavaBeanXXX as is done in the FXML class. -- NOTE: If the Java Bean class is in a named module, then it must be reflectively accessible to the

Re: 8178380: Module system implementation refresh (5/2017 update)

2017-05-02 Thread stanislav lukyanov
Hi Alan, In the Launcher-Agent-Class, would it make sense to use 'premain' instead of 'agentmain' to align it with Premain-Class rather than with Agent-Class? (maybe even rename Launcher-Agent-Class to Launcher-Premain-Class?) AFAIU Launcher-Agent-Class is meant to replace a particular use

Re: Accessing module internals from bytecode rewriting agent

2017-05-02 Thread Remi Forax
Hi Kirk, --patch-module both at compile time and at runtime is what your are looking for. cheers, Rémi - Mail original - > De: "Kirk Pepperdine" > À: "Alan Bateman" > Cc: "jigsaw-dev" ,

Re: Accessing module internals from bytecode rewriting agent

2017-05-02 Thread Michael Nascimento
On Tue, May 2, 2017 at 2:15 PM, Paul Sandoz wrote: > At one point we were mulling back porting the Java 9 runtime changes to > Java 8 and therefore we could go back to Java 7, but we decided not to > proceed with that, which is what i suspect you may be thinking about. >

Re: Accessing module internals from bytecode rewriting agent

2017-05-02 Thread Paul Sandoz
> On 2 May 2017, at 09:45, Michael Nascimento wrote: > > On Tue, May 2, 2017 at 11:51 AM, Brian Goetz wrote: > >> 8 can deal with multi-release JARs. >> > > I missed that. Starting with what update? Is there any link I could use to > share this

Re: Review Request: JDK-8020801: Apply the restriction of invoking MethodHandles.lookup to j.l.r.Method.invoke

2017-05-02 Thread Mandy Chung
> On May 2, 2017, at 3:14 AM, Peter Levart wrote: > > I don't quite understand the need for bypassing the inflation of native into > generated method accessor The VM native reflection implementation does not know about this alternate `reflected$XXX` mechanism. No VM

Re: Accessing module internals from bytecode rewriting agent

2017-05-02 Thread Michael Nascimento
On Tue, May 2, 2017 at 11:51 AM, Brian Goetz wrote: > 8 can deal with multi-release JARs. > I missed that. Starting with what update? Is there any link I could use to share this info? Regards, Michael

Re: [9] Review request: 8177566: FX user module gets IllegalAccessException from sun.reflect.misc.Trampoline

2017-05-02 Thread Kevin Rushforth
David Hill wrote: Current: All classes and properties used in a select-binding have to be declared public. Additionally, if any class is in a named module, then the module must |open|

Re: [9] Review request: 8177566: FX user module gets IllegalAccessException from sun.reflect.misc.Trampoline

2017-05-02 Thread David Hill
Current: All classes and properties used in a select-binding have to be declared public. Additionally, if any class is in a named module, then the module must |open|

Re: 8178380: Module system implementation refresh (5/2017 update)

2017-05-02 Thread Mandy Chung
> On May 2, 2017, at 3:11 AM, Chris Hegarty wrote: > > Mandy, > > On 02/05/17 03:47, Mandy Chung wrote: >> >>> ... >> src/jdk.jartool/share/classes/sun/tools/jar/Main.java >> 619 if (dflag) { >> 620 //

Re: 8178380: Module system implementation refresh (5/2017 update)

2017-05-02 Thread Mandy Chung
> On May 2, 2017, at 4:28 AM, Alan Bateman wrote: > > I think this would clutter the class description and it might be better if we > added a note to the getPackages method. > That’s an alternative. >>

Re: Java Platform Module System

2017-05-02 Thread Jayaprakash Artanareeswaran
My previous email showed up blank. So, sending from another email account. Thanks Stephan for summing it up! And at the risk of repeating myself and Stephan, we are really blocked by these issues and eagerly waiting for the updated spec. I will also use this opportunity to add one more item

Re: [9] Review request: 8177566: FX user module gets IllegalAccessException from sun.reflect.misc.Trampoline

2017-05-02 Thread Alan Bateman
On 02/05/2017 01:21, Kevin Rushforth wrote: This review is being cross-posted to both openjfx-dev and jigsaw-dev. Please review the proposed fix for: https://bugs.openjdk.java.net/browse/JDK-8177566 http://cr.openjdk.java.net/~kcr/8177566/webrev.00/complete-webrev/ Details of the fix as well

Re: 8178380: Module system implementation refresh (5/2017 update)

2017-05-02 Thread Alan Bateman
On 02/05/2017 03:47, Mandy Chung wrote: : src/share/vm/services/attachListener.cpp 355 // Dynamic loading agents is not default by default typo: s/not default/not enabled? I agree, the comment is confused and better to remove it. src/share/vm/services/diagnosticCommand.cpp 771

hg: jigsaw/jake/hotspot: Remove confusing comment

2017-05-02 Thread alan . bateman
Changeset: 1fc81a6c3d44 Author:alanb Date: 2017-05-02 08:50 +0100 URL: http://hg.openjdk.java.net/jigsaw/jake/hotspot/rev/1fc81a6c3d44 Remove confusing comment ! src/share/vm/services/attachListener.cpp

hg: jigsaw/jake/jdk: 2 new changesets

2017-05-02 Thread alan . bateman
Changeset: f8e726766d59 Author:alanb Date: 2017-05-02 07:52 +0100 URL: http://hg.openjdk.java.net/jigsaw/jake/jdk/rev/f8e726766d59 ModuleFinder.of does not correcly handle JAR files in custom file systems ! src/java.base/share/classes/jdk/internal/module/ModulePath.java +

Re: Review Request: JDK-8020801: Apply the restriction of invoking MethodHandles.lookup to j.l.r.Method.invoke

2017-05-02 Thread Peter Levart
Hi Mandy, On 05/02/2017 04:37 AM, Mandy Chung wrote: Webrev: http://cr.openjdk.java.net/~mchung/jdk9/webrevs/8020801/webrev.00/ The big hammer check disallowing MethodHandles::lookup be called by system classes defined by the bootstrap class loader was added as defense-in-depth to prevent

Re: 8178380: Module system implementation refresh (5/2017 update)

2017-05-02 Thread Chris Hegarty
Mandy, On 02/05/17 03:47, Mandy Chung wrote: ... src/jdk.jartool/share/classes/sun/tools/jar/Main.java 619 if (dflag) { 620 // "--describe-module/-d" does not require file argument(s), 621 // but does accept

Re: Accessing module internals from bytecode rewriting agent

2017-05-02 Thread Alan Bateman
On 02/05/2017 07:50, Jeremy Manson wrote: : If we follow this path, before we migrate to Java 9, we would need to make sure all of our code builds and the tests pass with Java 9 and Java 8. We can't make all of the code build and the tests pass with Java 9 as-is, because many of them use