Re: 8170987: Module system implementation refresh (12/2016)

2016-12-15 Thread Alan Bateman

On 14/12/2016 23:31, Claes Redestad wrote:


Hi,

I took a quick pass over the jdk changes. It generally looks very good,
but I've got some comments:

MethodHandles.Lookup.dropLookupMode: The javadoc doesn't really roll
of the tongue here. Maybe "Creates a new lookup from the current one
where the given lookup mode has been dropped. ..." for starters?
John has a few tweaks to javadoc and also changes it to allow PROTECTED 
be dropped. I will get those changes into jake today and then see if we 
can improve the wording a bit.




ModuleDescriptor$Builder: should automatic be moved into a constructor
and automatic(boolean) removed for consistency with other boolean
attributes? My gut feeling tells me that
Builder.module("name").automatic(true) is non-sensical (not to mention
Builder.automaticModule("name").automatic(false)). It probably makes
no sense to export it through the JLMA bridge, but could avoid that
by adding a new private constructor called by the current.
We have re-visit a few things here as there are open questions on 
whether creating an automatic module via the Builder should require all 
packages to be exported and open. So I expect there will be changes here 
once we get to that overhaul.




WARNING could be a local anonymous class inside
printStackTraceIfExposedReflectively. ;-) A more noticeable cleanup
would be to move these methods to jdk/internal/reflect/Reflection.java
where there's now what appears to be code duplication (although the
printed messages diverge).
I'll look at it again, it was done this way to make it easy to leave the 
DEBUG_ADD_OPENS out.




In ClassWriter.java there's a comment line that seems to have been
removed by mistake.

Ugh, well spotted.

-Alan


hg: jigsaw/jake/jdk: 4 new changesets

2016-12-15 Thread alan . bateman
Changeset: bb62b60643d5
Author:alanb
Date:  2016-12-15 08:39 +
URL:   http://hg.openjdk.java.net/jigsaw/jake/jdk/rev/bb62b60643d5

Tweaks to Lookup::dropLookupMode
Contributed-by: john.r.r...@oracle.com

! src/java.base/share/classes/java/lang/invoke/MethodHandles.java
! test/java/lang/invoke/DropLookupModeTest.java

Changeset: cdf2a48c3ae4
Author:alanb
Date:  2016-12-15 08:41 +
URL:   http://hg.openjdk.java.net/jigsaw/jake/jdk/rev/cdf2a48c3ae4

Restore line from javadoc that was removed in error

! src/java.base/share/classes/jdk/internal/org/objectweb/asm/ClassWriter.java

Changeset: d3488b5ba452
Author:alanb
Date:  2016-12-15 08:41 +
URL:   http://hg.openjdk.java.net/jigsaw/jake/jdk/rev/d3488b5ba452

ModuleReferenceImpl requires module location

! src/java.base/share/classes/jdk/internal/module/ModuleReferenceImpl.java

Changeset: a79e36211f01
Author:alanb
Date:  2016-12-15 08:58 +
URL:   http://hg.openjdk.java.net/jigsaw/jake/jdk/rev/a79e36211f01

pack200 tests need update to support ModuleResolution attr

! test/tools/pack200/pack200-verifier/src/xmlkit/ClassReader.java



Re: 8170987: Module system implementation refresh (12/2016)

2016-12-15 Thread Alan Bateman

On 15/12/2016 01:17, Mandy Chung wrote:


I have pushed the change to rename jdk.crypto.pkcs11 and jdk.pack200
and dropped java.compact$N.  So module-info.java changes will not be
needed when you sync with jdk9/dev.

Thank you. I'll do a merge today to see that everything works together.


:

Not sure if it’s intended to have the javadoc for isJavaIdentifier
method be the same as isBinaryName.
We can drop it but it was left there to avoid needing to change the 
usages that will be changing once we sort out residual issues in the 
Builder API, specifically the uses/provides methods that don't yet do 
the right validation (the `provides` methods shouldn't allow simple 
names for example, it also needs to ensure that the builder can't create 
a ModuleDescriptor that claim to have a provider that is not in the 
module. So I think this will all clean itself up in time.




When we use —-module-version for user modules, the runtime will load
regex.  The system modules jlink plugin uses the cached version if
JDK modules to be compiled with —0module-version in the future.
This might be something we should look at in the future for performance.
I'm sure Claes will be interested in that although I don't think we have 
any need to compile the JDK modules with --module-version, except maybe 
for testing exploded modules.




src/java.base/share/classes/jdk/internal/module/ModuleResolution.java

   64 throw new RuntimeException("cannot add deprecated to " + 
value);

This comment applies to ModuleResoluton::with* methods.  This should
probably be an InternalError?

IllegalArgumentException will probably work here.

-Alan


hg: jigsaw/jake/jaxws: 2 new changesets

2016-12-15 Thread alan . bateman
Changeset: dd498e202ce3
Author:lana
Date:  2016-12-14 20:23 +
URL:   http://hg.openjdk.java.net/jigsaw/jake/jaxws/rev/dd498e202ce3

Added tag jdk-9+149 for changeset 72554d319b47

! .hgtags

Changeset: 18b4ef9dfb2a
Author:alanb
Date:  2016-12-15 11:54 +
URL:   http://hg.openjdk.java.net/jigsaw/jake/jaxws/rev/18b4ef9dfb2a

Merge




hg: jigsaw/jake/corba: 2 new changesets

2016-12-15 Thread alan . bateman
Changeset: 56d764f5b735
Author:lana
Date:  2016-12-14 20:23 +
URL:   http://hg.openjdk.java.net/jigsaw/jake/corba/rev/56d764f5b735

Added tag jdk-9+149 for changeset 00b19338e505

! .hgtags

Changeset: c7995982569d
Author:alanb
Date:  2016-12-15 11:42 +
URL:   http://hg.openjdk.java.net/jigsaw/jake/corba/rev/c7995982569d

Merge




hg: jigsaw/jake/nashorn: 4 new changesets

2016-12-15 Thread alan . bateman
Changeset: a42ebb5ed04b
Author:ihse
Date:  2016-12-07 09:48 +0100
URL:   http://hg.openjdk.java.net/jigsaw/jake/nashorn/rev/a42ebb5ed04b

8170629: Remove code duplication in test makefiles
Reviewed-by: erikj, dholmes

! test/Makefile

Changeset: c281306d33d8
Author:lana
Date:  2016-12-08 21:22 +
URL:   http://hg.openjdk.java.net/jigsaw/jake/nashorn/rev/c281306d33d8

Merge


Changeset: a9c819c3c7f6
Author:lana
Date:  2016-12-14 20:23 +
URL:   http://hg.openjdk.java.net/jigsaw/jake/nashorn/rev/a9c819c3c7f6

Added tag jdk-9+149 for changeset c281306d33d8

! .hgtags

Changeset: 2c28211a03cc
Author:alanb
Date:  2016-12-15 11:41 +
URL:   http://hg.openjdk.java.net/jigsaw/jake/nashorn/rev/2c28211a03cc

Merge

! .hgtags




hg: jigsaw/jake/hotspot: 5 new changesets

2016-12-15 Thread alan . bateman
Changeset: bdfe30141ef6
Author:ihse
Date:  2016-12-07 09:48 +0100
URL:   http://hg.openjdk.java.net/jigsaw/jake/hotspot/rev/bdfe30141ef6

8170629: Remove code duplication in test makefiles
Reviewed-by: erikj, dholmes

! test/Makefile

Changeset: cc0b239d99a9
Author:erikj
Date:  2016-12-07 16:08 +0100
URL:   http://hg.openjdk.java.net/jigsaw/jake/hotspot/rev/cc0b239d99a9

8141590: Cannot build Zero with devkit
Reviewed-by: ihse

! make/copy/Copy-java.base.gmk

Changeset: 30e1996bd55d
Author:lana
Date:  2016-12-08 21:21 +
URL:   http://hg.openjdk.java.net/jigsaw/jake/hotspot/rev/30e1996bd55d

Merge


Changeset: 00edf368e99b
Author:lana
Date:  2016-12-14 20:23 +
URL:   http://hg.openjdk.java.net/jigsaw/jake/hotspot/rev/00edf368e99b

Added tag jdk-9+149 for changeset 30e1996bd55d

! .hgtags

Changeset: 5797b315e2d8
Author:alanb
Date:  2016-12-15 11:42 +
URL:   http://hg.openjdk.java.net/jigsaw/jake/hotspot/rev/5797b315e2d8

Merge

! .hgtags



hg: jigsaw/jake/jaxp: 6 new changesets

2016-12-15 Thread alan . bateman
Changeset: 1ede1ddbd43a
Author:ihse
Date:  2016-12-07 09:48 +0100
URL:   http://hg.openjdk.java.net/jigsaw/jake/jaxp/rev/1ede1ddbd43a

8170629: Remove code duplication in test makefiles
Reviewed-by: erikj, dholmes

! test/Makefile

Changeset: 427ce6a2c674
Author:fyuan
Date:  2016-12-08 11:26 +0800
URL:   http://hg.openjdk.java.net/jigsaw/jake/jaxp/rev/427ce6a2c674

8169948: Update ServiceProviderTest for newDefaultInstance() methods in JAXP 
factories
Reviewed-by: dfuchs, joehw, lana

+ test/javax/xml/jaxp/module/ServiceProviderTest/DefaultFactoryWrapperTest.java
+ 
test/javax/xml/jaxp/module/ServiceProviderTest/src/DefaultFactoryWrapperTest/xmlwrapperprovider/module-info.java
+ 
test/javax/xml/jaxp/module/ServiceProviderTest/src/DefaultFactoryWrapperTest/xmlwrapperprovider/xwp/DatatypeFactoryWrapper.java
+ 
test/javax/xml/jaxp/module/ServiceProviderTest/src/DefaultFactoryWrapperTest/xmlwrapperprovider/xwp/DocumentBuilderFactoryWrapper.java
+ 
test/javax/xml/jaxp/module/ServiceProviderTest/src/DefaultFactoryWrapperTest/xmlwrapperprovider/xwp/SAXParserFactoryWrapper.java
+ 
test/javax/xml/jaxp/module/ServiceProviderTest/src/DefaultFactoryWrapperTest/xmlwrapperprovider/xwp/SchemaFactoryWrapper.java
+ 
test/javax/xml/jaxp/module/ServiceProviderTest/src/DefaultFactoryWrapperTest/xmlwrapperprovider/xwp/TransformerFactoryWrapper.java
+ 
test/javax/xml/jaxp/module/ServiceProviderTest/src/DefaultFactoryWrapperTest/xmlwrapperprovider/xwp/XMLEventFactoryWrapper.java
+ 
test/javax/xml/jaxp/module/ServiceProviderTest/src/DefaultFactoryWrapperTest/xmlwrapperprovider/xwp/XMLInputFactoryWrapper.java
+ 
test/javax/xml/jaxp/module/ServiceProviderTest/src/DefaultFactoryWrapperTest/xmlwrapperprovider/xwp/XMLOutputFactoryWrapper.java
+ 
test/javax/xml/jaxp/module/ServiceProviderTest/src/DefaultFactoryWrapperTest/xmlwrapperprovider/xwp/XPathFactoryWrapper.java

Changeset: e6e3de84b809
Author:lana
Date:  2016-12-07 06:01 -0800
URL:   http://hg.openjdk.java.net/jigsaw/jake/jaxp/rev/e6e3de84b809

8169618: JDK9 message drop interim resource updates - OpenJDK
Reviewed-by: rfield, peytoia, joehw, weijun
Contributed-by: li.ji...@oracle.com

! 
src/java.xml/share/classes/com/sun/org/apache/xalan/internal/res/XSLTErrorResources_de.java
! 
src/java.xml/share/classes/com/sun/org/apache/xalan/internal/res/XSLTErrorResources_es.java
! 
src/java.xml/share/classes/com/sun/org/apache/xalan/internal/res/XSLTErrorResources_fr.java
! 
src/java.xml/share/classes/com/sun/org/apache/xalan/internal/res/XSLTErrorResources_it.java
! 
src/java.xml/share/classes/com/sun/org/apache/xalan/internal/res/XSLTErrorResources_ja.java
! 
src/java.xml/share/classes/com/sun/org/apache/xalan/internal/res/XSLTErrorResources_ko.java
! 
src/java.xml/share/classes/com/sun/org/apache/xalan/internal/res/XSLTErrorResources_pt_BR.java
! 
src/java.xml/share/classes/com/sun/org/apache/xalan/internal/res/XSLTErrorResources_sv.java
! 
src/java.xml/share/classes/com/sun/org/apache/xalan/internal/res/XSLTErrorResources_zh_CN.java
! 
src/java.xml/share/classes/com/sun/org/apache/xalan/internal/res/XSLTErrorResources_zh_TW.java
! 
src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/util/ErrorMessages_de.java
! 
src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/util/ErrorMessages_es.java
! 
src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/util/ErrorMessages_fr.java
! 
src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/util/ErrorMessages_it.java
! 
src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/util/ErrorMessages_ja.java
! 
src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/util/ErrorMessages_ko.java
! 
src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/util/ErrorMessages_pt_BR.java
! 
src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/util/ErrorMessages_sv.java
! 
src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/util/ErrorMessages_zh_CN.java
! 
src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/util/ErrorMessages_zh_TW.java
! 
src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/runtime/ErrorMessages_de.java
! 
src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/runtime/ErrorMessages_es.java
! 
src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/runtime/ErrorMessages_fr.java
! 
src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/runtime/ErrorMessages_it.java
! 
src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/runtime/ErrorMessages_ja.java
! 
src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/runtime/ErrorMessages_ko.java
! 
src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/runtime/ErrorMessages_pt_BR.java
! 
src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/runtime/Err

hg: jigsaw/jake/langtools: 10 new changesets

2016-12-15 Thread alan . bateman
Changeset: 0bdb7cb95c68
Author:lana
Date:  2016-12-07 05:58 -0800
URL:   http://hg.openjdk.java.net/jigsaw/jake/langtools/rev/0bdb7cb95c68

8169618: JDK9 message drop interim resource updates - OpenJDK
Reviewed-by: rfield, peytoia, joehw, weijun
Contributed-by: li.ji...@oracle.com

! 
src/jdk.compiler/share/classes/com/sun/tools/javac/resources/compiler_ja.properties
! 
src/jdk.compiler/share/classes/com/sun/tools/javac/resources/compiler_zh_CN.properties
! 
src/jdk.compiler/share/classes/com/sun/tools/javac/resources/javac_ja.properties
! 
src/jdk.compiler/share/classes/com/sun/tools/javac/resources/javac_zh_CN.properties
! 
src/jdk.compiler/share/classes/com/sun/tools/javah/resources/l10n_ja.properties
! 
src/jdk.compiler/share/classes/com/sun/tools/javah/resources/l10n_zh_CN.properties
! 
src/jdk.javadoc/share/classes/com/sun/tools/javadoc/resources/javadoc_ja.properties
! 
src/jdk.javadoc/share/classes/com/sun/tools/javadoc/resources/javadoc_zh_CN.properties
! 
src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/resources/standard_ja.properties
! 
src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/resources/standard_zh_CN.properties
! 
src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/resources/doclets_ja.properties
! 
src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/resources/doclets_zh_CN.properties
! 
src/jdk.javadoc/share/classes/jdk/javadoc/internal/tool/resources/javadoc_ja.properties
! 
src/jdk.javadoc/share/classes/jdk/javadoc/internal/tool/resources/javadoc_zh_CN.properties
! src/jdk.jdeps/share/classes/com/sun/tools/javap/resources/javap_ja.properties
! 
src/jdk.jdeps/share/classes/com/sun/tools/javap/resources/javap_zh_CN.properties
! src/jdk.jdeps/share/classes/com/sun/tools/jdeps/resources/jdeps_ja.properties
! 
src/jdk.jdeps/share/classes/com/sun/tools/jdeps/resources/jdeps_zh_CN.properties
! 
src/jdk.jshell/share/classes/jdk/internal/jshell/tool/resources/l10n_ja.properties
! 
src/jdk.jshell/share/classes/jdk/internal/jshell/tool/resources/l10n_zh_CN.properties

Changeset: 9ebe388283a9
Author:bpatel
Date:  2016-12-08 12:46 -0800
URL:   http://hg.openjdk.java.net/jigsaw/jake/langtools/rev/9ebe388283a9

8168688: javadoc top left frame should display all modules while in module mode
Reviewed-by: jjg

! 
src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/FrameOutputWriter.java
! test/jdk/javadoc/doclet/testModules/TestModules.java

Changeset: 4da132af5f52
Author:lana
Date:  2016-12-08 21:21 +
URL:   http://hg.openjdk.java.net/jigsaw/jake/langtools/rev/4da132af5f52

Merge


Changeset: e655eba3ff9c
Author:jjg
Date:  2016-12-08 16:52 -0800
URL:   http://hg.openjdk.java.net/jigsaw/jake/langtools/rev/e655eba3ff9c

8170953: CheckResourceKeys tests should declare the resource package to be open
Reviewed-by: mchung

! test/jdk/javadoc/tool/CheckResourceKeys.java
! test/tools/javac/diags/CheckExamples.java
! test/tools/javac/diags/CheckResourceKeys.java
! test/tools/javac/warnings/VerifyLintDescriptions.java
! test/tools/javadoc/CheckResourceKeys.java

Changeset: 5d43af61155b
Author:cushon
Date:  2016-12-09 18:06 +0100
URL:   http://hg.openjdk.java.net/jigsaw/jake/langtools/rev/5d43af61155b

8170667: ClassReader assigns method parameters from MethodParameters 
incorrectly when long/double parameters are present
Summary: MethodParameters attribute does not skip a slot for long/double.
Reviewed-by: vromero, jlahoda

! src/jdk.compiler/share/classes/com/sun/tools/javac/jvm/ClassReader.java
+ test/tools/javac/T8170667/ParameterProcessor.java

Changeset: 27be91e4393b
Author:jjg
Date:  2016-12-09 16:24 -0800
URL:   http://hg.openjdk.java.net/jigsaw/jake/langtools/rev/27be91e4393b

8170251: Add javax.tools.Tool.name()
Reviewed-by: darcy, mchung

! src/java.compiler/share/classes/javax/tools/Tool.java
! src/jdk.compiler/share/classes/com/sun/tools/javac/api/JavacTool.java
! src/jdk.compiler/share/classes/module-info.java
! src/jdk.javadoc/share/classes/jdk/javadoc/internal/api/JavadocTool.java
! src/jdk.javadoc/share/classes/module-info.java
+ test/jdk/javadoc/tool/api/TestName.java
+ test/tools/javac/api/TestName.java

Changeset: e5e4064d037d
Author:jlahoda
Date:  2016-12-12 13:27 +0100
URL:   http://hg.openjdk.java.net/jigsaw/jake/langtools/rev/e5e4064d037d

8147527: Wrong code generated for postfix unary operators
Summary: Avoiding use of duplicated tree nodes when these may be changed in 
place.
Reviewed-by: mcimadamore, jlahoda
Contributed-by: bsr...@gmail.com

! src/jdk.compiler/share/classes/com/sun/tools/javac/comp/Lower.java
+ test/tools/javac/boxing/QualBoxedPostOp.java
+ test/tools/javac/boxing/QualBoxedPostOp2.java
+ test/tools/javac/boxing/QualBoxedPostOp3.java
+ test/tools/javac/boxing/QualBoxedPostOp3Parent.java
+ test/tools/javac/desugar/BoxingAndSuper.java

Changeset: 4d4cd7cd731c
Author:jlahoda
Date: 

hg: jigsaw/jake: 8 new changesets

2016-12-15 Thread alan . bateman
Changeset: 1620754492a5
Author:stsmirno
Date:  2016-12-07 09:23 +0100
URL:   http://hg.openjdk.java.net/jigsaw/jake/rev/1620754492a5

8170530: bash configure output contains a typo in a suggested library name
Reviewed-by: ihse

! common/autoconf/generated-configure.sh
! common/autoconf/help.m4

Changeset: 03e45f8d5325
Author:ihse
Date:  2016-12-07 09:46 +0100
URL:   http://hg.openjdk.java.net/jigsaw/jake/rev/03e45f8d5325

8170632: Stop modifying VERSION_OPT for adhoc builds on reconfigure
Reviewed-by: erikj

! common/autoconf/generated-configure.sh
! common/autoconf/jdk-version.m4

Changeset: 34bade2c592a
Author:ihse
Date:  2016-12-07 09:47 +0100
URL:   http://hg.openjdk.java.net/jigsaw/jake/rev/34bade2c592a

8170629: Remove code duplication in test makefiles
Reviewed-by: erikj, dholmes

+ test/TestCommon.gmk

Changeset: 66b770c85156
Author:erikj
Date:  2016-12-07 16:08 +0100
URL:   http://hg.openjdk.java.net/jigsaw/jake/rev/66b770c85156

8141590: Cannot build Zero with devkit
Reviewed-by: ihse

! common/autoconf/generated-configure.sh
! common/autoconf/lib-ffi.m4
! common/autoconf/spec.gmk.in
! common/conf/jib-profiles.js
! make/common/MakeBase.gmk
! make/devkit/Tools.gmk
! make/jprt.properties

Changeset: 4c39c7f924f0
Author:lana
Date:  2016-12-08 21:21 +
URL:   http://hg.openjdk.java.net/jigsaw/jake/rev/4c39c7f924f0

Merge


Changeset: b119012d1c2a
Author:michaelm
Date:  2016-12-09 11:34 +
URL:   http://hg.openjdk.java.net/jigsaw/jake/rev/b119012d1c2a

8170648: Move java.net.http package out of Java SE to incubator namespace
Reviewed-by: chegar, dfuchs, michaelm, prappo, skuksenko
Contributed-by: Chris Hegarty , Daniel Fuchs 
, Michael McMahon , 
Pavel Rappo , Sergey Kuksenko 
, anthony.vanelverdin...@gmail.com

! make/Javadoc.gmk
! make/common/Modules.gmk

Changeset: f8b26f09af63
Author:lana
Date:  2016-12-14 20:23 +
URL:   http://hg.openjdk.java.net/jigsaw/jake/rev/f8b26f09af63

Added tag jdk-9+149 for changeset b119012d1c2a

! .hgtags

Changeset: dd8e5d1b497c
Author:alanb
Date:  2016-12-15 11:41 +
URL:   http://hg.openjdk.java.net/jigsaw/jake/rev/dd8e5d1b497c

Merge

! common/autoconf/generated-configure.sh
! common/autoconf/spec.gmk.in
! common/conf/jib-profiles.js
! make/Javadoc.gmk
! make/common/MakeBase.gmk
! make/common/Modules.gmk
! make/jprt.properties



hg: jigsaw/jake/jdk: 45 new changesets

2016-12-15 Thread alan . bateman
Changeset: 4629fe47e826
Author:sherman
Date:  2016-12-06 14:44 -0800
URL:   http://hg.openjdk.java.net/jigsaw/jake/jdk/rev/4629fe47e826

8170828: test/java/util/zip/ZipFile/TestZipFile needs @modules to work with 
Method.setAccessible()
Reviewed-by: martin, rriggs

! test/java/util/zip/ZipFile/TestZipFile.java

Changeset: 841075d55095
Author:smarks
Date:  2016-12-06 17:26 -0800
URL:   http://hg.openjdk.java.net/jigsaw/jake/jdk/rev/841075d55095

8166446: SingletonIterator.forEachRemaining doesn't advance before calling 
action
Reviewed-by: martin

! src/java.base/share/classes/java/util/Collections.java
! test/java/util/Collections/SingletonIterator.java

Changeset: 10b191e1793b
Author:mli
Date:  2016-12-06 17:53 -0800
URL:   http://hg.openjdk.java.net/jigsaw/jake/jdk/rev/10b191e1793b

8170704: java/rmi/activation/Activatable/* tests fails intermittently with 
"output improperly annotated"
Reviewed-by: dfuchs, rriggs

! test/java/rmi/activation/Activatable/checkAnnotations/CheckAnnotations.java

Changeset: f22652e8f85f
Author:xiaofeya
Date:  2016-12-06 17:49 -0800
URL:   http://hg.openjdk.java.net/jigsaw/jake/jdk/rev/f22652e8f85f

8081390: javax/management/remote/mandatory/connection/RMIConnector_NPETest.java 
may leave orphaned processes
Reviewed-by: rriggs

! test/javax/management/remote/mandatory/connection/RMIConnector_NPETest.java

Changeset: 0ceaa5dc89ec
Author:rgoel
Date:  2016-12-07 11:35 +0530
URL:   http://hg.openjdk.java.net/jigsaw/jake/jdk/rev/0ceaa5dc89ec

8071929: Locale.getISOCountries() has inconsistent behaviour for "AN", "BU" and 
"CS" country codes.
Reviewed-by: naoto

! src/java.base/share/classes/java/util/Locale.java
! src/java.base/share/classes/java/util/LocaleISOData.java
+ test/java/util/Locale/Bug8071929.java

Changeset: df8bc808aeb9
Author:ihse
Date:  2016-12-07 09:48 +0100
URL:   http://hg.openjdk.java.net/jigsaw/jake/jdk/rev/df8bc808aeb9

8170629: Remove code duplication in test makefiles
Reviewed-by: erikj, dholmes

! test/Makefile

Changeset: c1b4d9879aea
Author:chegar
Date:  2016-12-07 09:32 +
URL:   http://hg.openjdk.java.net/jigsaw/jake/jdk/rev/c1b4d9879aea

8169653: Restore ObjectInputStream::resolveClass call stack default search order
Reviewed-by: dfuchs, mchung

! src/java.base/share/classes/java/io/ObjectInputStream.java

Changeset: b9cdffb87bea
Author:mullan
Date:  2016-12-07 10:55 -0500
URL:   http://hg.openjdk.java.net/jigsaw/jake/jdk/rev/b9cdffb87bea

8158517: Minor optimizations to ISO10126PADDING
Reviewed-by: mullan
Contributed-by: adam.petc...@oracle.com, e...@zusammenkunft.net

! src/java.base/share/classes/com/sun/crypto/provider/ISO10126Padding.java

Changeset: 26c1193265d6
Author:naoto
Date:  2016-12-07 08:54 -0800
URL:   http://hg.openjdk.java.net/jigsaw/jake/jdk/rev/26c1193265d6

8170465: JNI exception pending in jni_util.c:190
8170466: JNI exception pending in jni_util.c:190
Reviewed-by: dholmes

! src/java.base/share/native/libjava/jni_util.c

Changeset: 54378adce7f1
Author:martin
Date:  2016-11-30 19:40 -0800
URL:   http://hg.openjdk.java.net/jigsaw/jake/jdk/rev/54378adce7f1

8170560: Improve code samples in Collectors javadoc
Reviewed-by: psandoz

! src/java.base/share/classes/java/util/stream/Collectors.java

Changeset: 5689c7c6c075
Author:sherman
Date:  2016-12-07 11:53 -0800
URL:   http://hg.openjdk.java.net/jigsaw/jake/jdk/rev/5689c7c6c075

8170831: ZipFile implementation no longer caches the last accessed entry/pos
Reviewed-by: psandoz

! src/java.base/share/classes/java/util/zip/ZipFile.java

Changeset: 78a9122885d1
Author:darcy
Date:  2016-12-07 12:47 -0800
URL:   http://hg.openjdk.java.net/jigsaw/jake/jdk/rev/78a9122885d1

8170875: Problem list LocaleTest.java until JDK-8170840 is fixed
Reviewed-by: rriggs, naoto

! test/ProblemList.txt

Changeset: 47e0091b0fbe
Author:rriggs
Date:  2016-12-07 15:32 -0500
URL:   http://hg.openjdk.java.net/jigsaw/jake/jdk/rev/47e0091b0fbe

8170291: Unpredictable results of j.i.ObjectInputFilter::createFilter
Reviewed-by: dfuchs

! src/java.base/share/classes/java/io/ObjectInputFilter.java
! src/java.base/share/classes/java/io/ObjectInputStream.java
! test/java/io/Serializable/serialFilter/SerialFilterTest.java

Changeset: c0af0f58d538
Author:bpb
Date:  2016-12-02 13:22 -0800
URL:   http://hg.openjdk.java.net/jigsaw/jake/jdk/rev/c0af0f58d538

8168628: (fc) SIGBUS when extending file size to map it
Summary: Synchronize file extension and subsequent map0(); on Linux use 
fallocate64() instead of ftruncate64().
Reviewed-by: rehn, simonis, alanb

! make/mapfiles/libnio/mapfile-linux
! make/mapfiles/libnio/mapfile-macosx
! make/mapfiles/libnio/mapfile-solaris
! src/java.base/share/classes/sun/nio/ch/FileChannelImpl.java
! src/java.base/share/classes/sun/nio/ch/FileDispatcher.java
! src/java.base/unix/classes/sun/nio/ch/FileDispatcherImpl.java
! src/

Re: Java 9 build 148 causes trouble in Apache Lucene/Solr/Elasticsearch

2016-12-15 Thread Alan Bateman



On 13/12/2016 21:18, Peter Levart wrote:

I think this is OK.

Just a couple of nits in test:

1. You create a static Path bob = Paths.get("bob") field, but then you 
don't use it in:


  56 try (FileChannel fc = FileChannel.open(Paths.get("bob"), 
CREATE, WRITE)) {


Adding to Peter's comment, this can be further changed to use 
Files.write(bob, srcData).


Otherwise I think the patch looks okay although it does feel like 
invokeCleaner needs a warning in the javadoc, maybe being in Unsafe is 
enough.


-Alan




hg: jigsaw/jake/jdk: tools/jimage/VerifyJimage.java failing with incubator modules

2016-12-15 Thread alan . bateman
Changeset: fbb8f2c7f236
Author:alanb
Date:  2016-12-15 12:35 +
URL:   http://hg.openjdk.java.net/jigsaw/jake/jdk/rev/fbb8f2c7f236

tools/jimage/VerifyJimage.java failing with incubator modules

! test/tools/jimage/VerifyJimage.java



Re: 8170987: Module system implementation refresh (12/2016)

2016-12-15 Thread Maurizio Cimadamore

Langtools changes look good - I like the changes in ClassReader/Writer.

Maurizio


On 14/12/16 21:46, Alan Bateman wrote:
Folks on jigsaw-dev will be aware that we are on yet another mission 
to bring the changes accumulated in the jake forest to jdk9/dev. The 
plan this time is to bring the changes to jdk9/dev to make jdk-9+150.


The changes in this update are mostly for JSR 376 issues 
#VersionedDependences and #ModuleNameCharacters and so involve updates 
to the binary form of the module declaration. There is also some small 
changes left over from #IndirectQualifiedReflectiveAccess that we 
didn't include in the last refresh.


This update has the implementation of Incubator Modules (JEP 11 [1]), 
everything except the javac support. This was initially planned to 
push to jdk9/dev but was re-routed to jake to avoid needing re-work 
when merged with the changes in jake.


There is a bit of refactoring in the implementation in this update. We 
expect to do more on than, plus lots of clean-up, once all the feature 
work is out of way.


The webrevs with the changes for this update are here:

   http://cr.openjdk.java.net/~alanb/8170987/1

They are currently based on jdk-9+148 and will be re-based for 
jdk9/dev later this week.


One review note this time is to ignore the changes in ModuleBootstrap 
for DEBUG_ADD_OPENS, that is the only change in this webrev that is 
not proposed to move to jdk9/dev.


-Alan

[1] http://openjdk.java.net/jeps/11





hg: jigsaw/jake/jdk: Review comments and cleanup

2016-12-15 Thread chris . hegarty
Changeset: eb56db7b3aaa
Author:chegar
Date:  2016-12-15 14:10 +
URL:   http://hg.openjdk.java.net/jigsaw/jake/jdk/rev/eb56db7b3aaa

Review comments and cleanup

! src/java.base/share/classes/jdk/internal/module/ModuleBootstrap.java
! src/java.base/share/classes/jdk/internal/module/ModuleResolution.java
! src/jdk.jartool/share/classes/sun/tools/jar/GNUStyleOptions.java
! src/jdk.jartool/share/classes/sun/tools/jar/Main.java
! src/jdk.jlink/share/classes/jdk/tools/jlink/internal/JlinkTask.java
! src/jdk.jlink/share/classes/jdk/tools/jmod/JmodTask.java
! test/jdk/modules/incubator/ImageModules.java



Re: 8170987: Module system implementation refresh (12/2016)

2016-12-15 Thread Chris Hegarty

> On 15 Dec 2016, at 01:17, Mandy Chung  wrote:
> ...
> 
> src/java.base/share/classes/jdk/internal/module/ModuleResolution.java
> 
>  64 throw new RuntimeException("cannot add deprecated to " + 
> value);
> 
> This comment applies to ModuleResoluton::with* methods.  This should
> probably be an InternalError?  

I think InternalError is suitable here. These checks are to ensure tools don’t 
do
anything inappropriate.

> 108 return String.valueOf(value);
> 
> Nit: since you override toString method, might be helpful to print
> an informative description.  

Done.

> src/jdk.jlink/share/classes/jdk/tools/jmod/JmodTask.java
> 
> 1102 if (value.equals("deprecated"))
> 1103 return (new ModuleResolution(0)).withDeprecated();
> 1104 else if (value.equals("deprecated-for-removal"))
> 1105 return (new 
> ModuleResolution(0)).withDeprecatedForRemoval();
> 1106 else if (value.equals("incubating"))
> 1107 return (new ModuleResolution(0)).withIncubating();
> 
> Why not passing the flag to ModuleResolution constructor?  Similar
> statement is also in sun/tools/jar/GNUStyleOptions.java.

I cleaned this up a little. I don’t want the tools to have knowledge of the 
actual 
flag values.

> I was wondering if jmod describe and jar —-print-module-descriptor should
> print all optional attributes.  While the module resolution is of limited
> use, it would be handy to print all optional attributes, if present rather
> than having to run java.

Agreed.

> It’s okay to follow up as a separate JBS issue if we want to do that.

If I don’t get to it before this Friday, I’ll follow up with a separate issue.

> test/jdk/modules/incubator/ImageModules.java
>  @modules jdk.jlink jdk.jartool are missing.  I have fixed it.

Thanks.
-Chris.

Re: 8170987: Module system implementation refresh (12/2016)

2016-12-15 Thread Claes Redestad

On 2016-12-15 10:17, Alan Bateman wrote:


When we use —-module-version for user modules, the runtime will load
regex.  The system modules jlink plugin uses the cached version if
JDK modules to be compiled with —0module-version in the future.
This might be something we should look at in the future for performance.

I'm sure Claes will be interested in that although I don't think we have
any need to compile the JDK modules with --module-version, except maybe
for testing exploded modules.


The context here, I assume, is the increased startup cost to initialize
java.util.regex in 9 (and a few regression fixes related to this that
I've done in the area which may have involved avoiding adding a
regex-free fast path for trivial but common cases):

The intent is and always has been to avoid introducing startup
regressions on small and maybe more importantly *existing* applications, 
be it just running java -version or tiny (jar-based)

tools which may have been optimized and tuned to start and run quickly
by having a minimal number of dependencies on JDK library classes.

In the grand scheme of things the startup and overheads of using
lambdas, regexes etc is tiny and will mostly be amortized by subsequent
use (and we're still finding ways to improve it even further), thus for
new use cases and features (such as --module-version) I think we can
and should use any and all features of the language if and when it
makes sense to do so.

Thanks!

/Claes


Re: 8170987: Module system implementation refresh (12/2016)

2016-12-15 Thread Chris Hegarty

> On 15 Dec 2016, at 09:17, Alan Bateman  wrote:
>> ...
>> When we use —-module-version for user modules, the runtime will load
>> regex.  The system modules jlink plugin uses the cached version if
>> JDK modules to be compiled with —0module-version in the future.
>> This might be something we should look at in the future for performance.
> I'm sure Claes will be interested in that although I don't think we have any 
> need to compile the JDK modules with --module-version, except maybe for 
> testing exploded modules.

Don’t we want the Optional returned by Requires::compiledVersion
to be non-empty, for system modules?

-Chris.



Re: --add-opens on an automatic module ?

2016-12-15 Thread David Hill


Alan,

I thought I would toss you the options and the full exception just in case you 
see something really obvious.

thanks,
   Dave

public class GradleResolveVisitor extends ResolveVisitor {


Running with jdk build 148, gradle 3.1

ddhill@ddhill-pad:~/sb/9/graphics/rt$ echo $_JAVA_OPTIONS
-Dsun.reflect.debugModuleAccessChecks=true 
--add-opens=java.base/java.lang=ALL-UNNAMED 
--add-opens=java.base/java.util=ALL-UNNAMED 
--add-opens=java.base/java.lang.invoke=ALL-UNNAMED 
--add-opens=java.base/java.io=ALL-UNNAMED 
--add-opens=java.base/java.util.concurrent=ALL-UNNAMED 
--add-opens=java.base/java.text=ALL-UNNAMED

I get this, I think only when a gradle deamon starts.

java.lang.IllegalAccessException: class 
org.gradle.groovy.scripts.internal.GradleResolveVisitor cannot access a member of class 
org.codehaus.groovy.control.ClassNodeResolver with modifiers "protected static 
final"
at 
java.base/jdk.internal.reflect.Reflection.throwIllegalAccessException(Reflection.java:418)
at 
java.base/jdk.internal.reflect.Reflection.throwIllegalAccessException(Reflection.java:409)
at 
java.base/jdk.internal.reflect.Reflection.ensureMemberAccess(Reflection.java:111)
at 
java.base/java.lang.reflect.AccessibleObject.slowCheckMemberAccess(AccessibleObject.java:364)
at 
java.base/java.lang.reflect.AccessibleObject.checkAccess(AccessibleObject.java:356)
at java.base/java.lang.reflect.Field.checkAccess(Field.java:1065)
at java.base/java.lang.reflect.Field.get(Field.java:406)
at 
org.gradle.groovy.scripts.internal.GradleResolveVisitor.(GradleResolveVisitor.java:760)
at 
org.gradle.groovy.scripts.internal.DefaultScriptCompilationHandler$CustomCompilationUnit.(DefaultScriptCompilationHandler.java:283)
at 
org.gradle.groovy.scripts.internal.DefaultScriptCompilationHandler$1.createCompilationUnit(DefaultScriptCompilationHandler.java:111)
at groovy.lang.GroovyClassLoader.doParseClass(GroovyClassLoader.java:277)
at groovy.lang.GroovyClassLoader.parseClass(GroovyClassLoader.java:268)
at 
org.gradle.groovy.scripts.internal.DefaultScriptCompilationHandler.compileScript(DefaultScriptCompilationHandler.java:129)
at 
org.gradle.groovy.scripts.internal.DefaultScriptCompilationHandler.compileToDir(DefaultScriptCompilationHandler.java:89)
at 
org.gradle.groovy.scripts.internal.FileCacheBackedScriptClassCompiler$CompileToCrossBuildCacheAction.execute(FileCacheBackedScriptClassCompiler.java:153)
at 
org.gradle.groovy.scripts.internal.FileCacheBackedScriptClassCompiler$CompileToCrossBuildCacheAction.execute(FileCacheBackedScriptClassCompiler.java:134)
at 
org.gradle.groovy.scripts.internal.FileCacheBackedScriptClassCompiler$ProgressReportingInitializer.execute(FileCacheBackedScriptClassCompiler.java:177)
at 
org.gradle.groovy.scripts.internal.FileCacheBackedScriptClassCompiler$ProgressReportingInitializer.execute(FileCacheBackedScriptClassCompiler.java:157)
at 
org.gradle.cache.internal.DefaultPersistentDirectoryCache$Initializer.initialize(DefaultPersistentDirectoryCache.java:98)
at 
org.gradle.cache.internal.DefaultCacheAccess$2.run(DefaultCacheAccess.java:104)
at 
org.gradle.cache.internal.DefaultFileLockManager$DefaultFileLock.doWriteAction(DefaultFileLockManager.java:179)
at 
org.gradle.cache.internal.DefaultFileLockManager$DefaultFileLock.writeFile(DefaultFileLockManager.java:169)
at 
org.gradle.cache.internal.DefaultCacheAccess.open(DefaultCacheAccess.java:102)
at 
org.gradle.cache.internal.DefaultPersistentDirectoryStore.open(DefaultPersistentDirectoryStore.java:46)
at 
org.gradle.cache.internal.DefaultPersistentDirectoryStore.open(DefaultPersistentDirectoryStore.java:28)
at 
org.gradle.cache.internal.DefaultCacheFactory.doOpen(DefaultCacheFactory.java:80)
at 
org.gradle.cache.internal.DefaultCacheFactory.open(DefaultCacheFactory.java:50)
at 
org.gradle.cache.internal.DefaultCacheRepository$PersistentCacheBuilder.doOpen(DefaultCacheRepository.java:138)
at 
org.gradle.cache.internal.DefaultCacheRepository$AbstractCacheBuilder.open(DefaultCacheRepository.java:121)
at 
org.gradle.groovy.scripts.internal.FileCacheBackedScriptClassCompiler$RemapBuildScriptsAction.execute(FileCacheBackedScriptClassCompiler.java:349)
at 
org.gradle.groovy.scripts.internal.FileCacheBackedScriptClassCompiler$RemapBuildScriptsAction.execute(FileCacheBackedScriptClassCompiler.java:325)
at 
org.gradle.groovy.scripts.internal.FileCacheBackedScriptClassCompiler$ProgressReportingInitializer.execute(FileCacheBackedScriptClassCompiler.java:177)
at 
org.gradle.groovy.scripts.internal.FileCacheBackedScriptClassCompiler$ProgressReportingInitializer.execute(FileCacheBackedScriptClassCompiler.java:157)
at 
org.gradle.cache.internal.DefaultPersistentDirectoryCache$Initializer.initialize(DefaultPersistentDirectoryCache.java:98)
at 
org.gradle.cache.internal.DefaultCacheAccess$2.run(DefaultCacheAccess.java:104)
at 
org.gradle.cache.i

Re: --add-opens on an automatic module ?

2016-12-15 Thread Kevin Rushforth
Is it possible that this exception, which seems harmless as far as I can 
tell, predates the latest jdk-9+148 jigsaw updates, and that the only 
reason we are seeing it now is because of the 
"-Dsun.reflect.debugModuleAccessChecks=true" ?


-- Kevin


David Hill wrote:


Alan,

I thought I would toss you the options and the full exception just in 
case you see something really obvious.


thanks,
   Dave

public class GradleResolveVisitor extends ResolveVisitor {


Running with jdk build 148, gradle 3.1

ddhill@ddhill-pad:~/sb/9/graphics/rt$ echo $_JAVA_OPTIONS
-Dsun.reflect.debugModuleAccessChecks=true 
--add-opens=java.base/java.lang=ALL-UNNAMED 
--add-opens=java.base/java.util=ALL-UNNAMED 
--add-opens=java.base/java.lang.invoke=ALL-UNNAMED 
--add-opens=java.base/java.io=ALL-UNNAMED 
--add-opens=java.base/java.util.concurrent=ALL-UNNAMED 
--add-opens=java.base/java.text=ALL-UNNAMED


I get this, I think only when a gradle deamon starts.

java.lang.IllegalAccessException: class 
org.gradle.groovy.scripts.internal.GradleResolveVisitor cannot access 
a member of class org.codehaus.groovy.control.ClassNodeResolver with 
modifiers "protected static final"
at 
java.base/jdk.internal.reflect.Reflection.throwIllegalAccessException(Reflection.java:418) 

at 
java.base/jdk.internal.reflect.Reflection.throwIllegalAccessException(Reflection.java:409) 

at 
java.base/jdk.internal.reflect.Reflection.ensureMemberAccess(Reflection.java:111) 

at 
java.base/java.lang.reflect.AccessibleObject.slowCheckMemberAccess(AccessibleObject.java:364) 

at 
java.base/java.lang.reflect.AccessibleObject.checkAccess(AccessibleObject.java:356) 


at java.base/java.lang.reflect.Field.checkAccess(Field.java:1065)
at java.base/java.lang.reflect.Field.get(Field.java:406)
at 
org.gradle.groovy.scripts.internal.GradleResolveVisitor.(GradleResolveVisitor.java:760) 

at 
org.gradle.groovy.scripts.internal.DefaultScriptCompilationHandler$CustomCompilationUnit.(DefaultScriptCompilationHandler.java:283) 

at 
org.gradle.groovy.scripts.internal.DefaultScriptCompilationHandler$1.createCompilationUnit(DefaultScriptCompilationHandler.java:111) 

at 
groovy.lang.GroovyClassLoader.doParseClass(GroovyClassLoader.java:277)
at 
groovy.lang.GroovyClassLoader.parseClass(GroovyClassLoader.java:268)
at 
org.gradle.groovy.scripts.internal.DefaultScriptCompilationHandler.compileScript(DefaultScriptCompilationHandler.java:129) 

at 
org.gradle.groovy.scripts.internal.DefaultScriptCompilationHandler.compileToDir(DefaultScriptCompilationHandler.java:89) 

at 
org.gradle.groovy.scripts.internal.FileCacheBackedScriptClassCompiler$CompileToCrossBuildCacheAction.execute(FileCacheBackedScriptClassCompiler.java:153) 

at 
org.gradle.groovy.scripts.internal.FileCacheBackedScriptClassCompiler$CompileToCrossBuildCacheAction.execute(FileCacheBackedScriptClassCompiler.java:134) 

at 
org.gradle.groovy.scripts.internal.FileCacheBackedScriptClassCompiler$ProgressReportingInitializer.execute(FileCacheBackedScriptClassCompiler.java:177) 

at 
org.gradle.groovy.scripts.internal.FileCacheBackedScriptClassCompiler$ProgressReportingInitializer.execute(FileCacheBackedScriptClassCompiler.java:157) 

at 
org.gradle.cache.internal.DefaultPersistentDirectoryCache$Initializer.initialize(DefaultPersistentDirectoryCache.java:98) 

at 
org.gradle.cache.internal.DefaultCacheAccess$2.run(DefaultCacheAccess.java:104) 

at 
org.gradle.cache.internal.DefaultFileLockManager$DefaultFileLock.doWriteAction(DefaultFileLockManager.java:179) 

at 
org.gradle.cache.internal.DefaultFileLockManager$DefaultFileLock.writeFile(DefaultFileLockManager.java:169) 

at 
org.gradle.cache.internal.DefaultCacheAccess.open(DefaultCacheAccess.java:102) 

at 
org.gradle.cache.internal.DefaultPersistentDirectoryStore.open(DefaultPersistentDirectoryStore.java:46) 

at 
org.gradle.cache.internal.DefaultPersistentDirectoryStore.open(DefaultPersistentDirectoryStore.java:28) 

at 
org.gradle.cache.internal.DefaultCacheFactory.doOpen(DefaultCacheFactory.java:80) 

at 
org.gradle.cache.internal.DefaultCacheFactory.open(DefaultCacheFactory.java:50) 

at 
org.gradle.cache.internal.DefaultCacheRepository$PersistentCacheBuilder.doOpen(DefaultCacheRepository.java:138) 

at 
org.gradle.cache.internal.DefaultCacheRepository$AbstractCacheBuilder.open(DefaultCacheRepository.java:121) 

at 
org.gradle.groovy.scripts.internal.FileCacheBackedScriptClassCompiler$RemapBuildScriptsAction.execute(FileCacheBackedScriptClassCompiler.java:349) 

at 
org.gradle.groovy.scripts.internal.FileCacheBackedScriptClassCompiler$RemapBuildScriptsAction.execute(FileCacheBackedScriptClassCompiler.java:325) 

at 
org.gradle.groovy.scripts.internal.FileCacheBackedScriptClassCompiler$ProgressReportingInitializer.execute(FileCacheBackedScriptClassCompiler.java:177) 

at 
org.gradle.groovy.scripts.internal.FileCacheBackedScriptClassComp

Re: --add-opens on an automatic module ?

2016-12-15 Thread Claes Redestad

Yes.

"is this something that is logged when you are using
-Dsun.reflect.debugModuleAccessChecks=true? In that case this could be
a pre-existing exception that is/was being swallowed."

http://mail.openjdk.java.net/pipermail/jigsaw-dev/2016-December/010587.html

/Claes

On 2016-12-15 16:02, Kevin Rushforth wrote:

Is it possible that this exception, which seems harmless as far as I can
tell, predates the latest jdk-9+148 jigsaw updates, and that the only
reason we are seeing it now is because of the
"-Dsun.reflect.debugModuleAccessChecks=true" ?

-- Kevin


David Hill wrote:


Alan,

I thought I would toss you the options and the full exception just in
case you see something really obvious.

thanks,
   Dave

public class GradleResolveVisitor extends ResolveVisitor {


Running with jdk build 148, gradle 3.1

ddhill@ddhill-pad:~/sb/9/graphics/rt$ echo $_JAVA_OPTIONS
-Dsun.reflect.debugModuleAccessChecks=true
--add-opens=java.base/java.lang=ALL-UNNAMED
--add-opens=java.base/java.util=ALL-UNNAMED
--add-opens=java.base/java.lang.invoke=ALL-UNNAMED
--add-opens=java.base/java.io=ALL-UNNAMED
--add-opens=java.base/java.util.concurrent=ALL-UNNAMED
--add-opens=java.base/java.text=ALL-UNNAMED

I get this, I think only when a gradle deamon starts.

java.lang.IllegalAccessException: class
org.gradle.groovy.scripts.internal.GradleResolveVisitor cannot access
a member of class org.codehaus.groovy.control.ClassNodeResolver with
modifiers "protected static final"
at
java.base/jdk.internal.reflect.Reflection.throwIllegalAccessException(Reflection.java:418)

at
java.base/jdk.internal.reflect.Reflection.throwIllegalAccessException(Reflection.java:409)

at
java.base/jdk.internal.reflect.Reflection.ensureMemberAccess(Reflection.java:111)

at
java.base/java.lang.reflect.AccessibleObject.slowCheckMemberAccess(AccessibleObject.java:364)

at
java.base/java.lang.reflect.AccessibleObject.checkAccess(AccessibleObject.java:356)

at java.base/java.lang.reflect.Field.checkAccess(Field.java:1065)
at java.base/java.lang.reflect.Field.get(Field.java:406)
at
org.gradle.groovy.scripts.internal.GradleResolveVisitor.(GradleResolveVisitor.java:760)

at
org.gradle.groovy.scripts.internal.DefaultScriptCompilationHandler$CustomCompilationUnit.(DefaultScriptCompilationHandler.java:283)

at
org.gradle.groovy.scripts.internal.DefaultScriptCompilationHandler$1.createCompilationUnit(DefaultScriptCompilationHandler.java:111)

at
groovy.lang.GroovyClassLoader.doParseClass(GroovyClassLoader.java:277)
at
groovy.lang.GroovyClassLoader.parseClass(GroovyClassLoader.java:268)
at
org.gradle.groovy.scripts.internal.DefaultScriptCompilationHandler.compileScript(DefaultScriptCompilationHandler.java:129)

at
org.gradle.groovy.scripts.internal.DefaultScriptCompilationHandler.compileToDir(DefaultScriptCompilationHandler.java:89)

at
org.gradle.groovy.scripts.internal.FileCacheBackedScriptClassCompiler$CompileToCrossBuildCacheAction.execute(FileCacheBackedScriptClassCompiler.java:153)

at
org.gradle.groovy.scripts.internal.FileCacheBackedScriptClassCompiler$CompileToCrossBuildCacheAction.execute(FileCacheBackedScriptClassCompiler.java:134)

at
org.gradle.groovy.scripts.internal.FileCacheBackedScriptClassCompiler$ProgressReportingInitializer.execute(FileCacheBackedScriptClassCompiler.java:177)

at
org.gradle.groovy.scripts.internal.FileCacheBackedScriptClassCompiler$ProgressReportingInitializer.execute(FileCacheBackedScriptClassCompiler.java:157)

at
org.gradle.cache.internal.DefaultPersistentDirectoryCache$Initializer.initialize(DefaultPersistentDirectoryCache.java:98)

at
org.gradle.cache.internal.DefaultCacheAccess$2.run(DefaultCacheAccess.java:104)

at
org.gradle.cache.internal.DefaultFileLockManager$DefaultFileLock.doWriteAction(DefaultFileLockManager.java:179)

at
org.gradle.cache.internal.DefaultFileLockManager$DefaultFileLock.writeFile(DefaultFileLockManager.java:169)

at
org.gradle.cache.internal.DefaultCacheAccess.open(DefaultCacheAccess.java:102)

at
org.gradle.cache.internal.DefaultPersistentDirectoryStore.open(DefaultPersistentDirectoryStore.java:46)

at
org.gradle.cache.internal.DefaultPersistentDirectoryStore.open(DefaultPersistentDirectoryStore.java:28)

at
org.gradle.cache.internal.DefaultCacheFactory.doOpen(DefaultCacheFactory.java:80)

at
org.gradle.cache.internal.DefaultCacheFactory.open(DefaultCacheFactory.java:50)

at
org.gradle.cache.internal.DefaultCacheRepository$PersistentCacheBuilder.doOpen(DefaultCacheRepository.java:138)

at
org.gradle.cache.internal.DefaultCacheRepository$AbstractCacheBuilder.open(DefaultCacheRepository.java:121)

at
org.gradle.groovy.scripts.internal.FileCacheBackedScriptClassCompiler$RemapBuildScriptsAction.execute(FileCacheBackedScriptClassCompiler.java:349)

at
org.gradle.groovy.scripts.internal.FileCacheBackedScriptClassCompiler$RemapBuildScriptsAction.execute(FileCacheBackedScriptClassCompiler.ja

Re: --add-opens on an automatic module ?

2016-12-15 Thread Kevin Rushforth
Ah, thanks, I missed your email suggesting the same thing. I can test 
this and report back.


-- Kevin

Claes Redestad wrote:

Yes.

"is this something that is logged when you are using
-Dsun.reflect.debugModuleAccessChecks=true? In that case this could be
a pre-existing exception that is/was being swallowed."

http://mail.openjdk.java.net/pipermail/jigsaw-dev/2016-December/010587.html 



/Claes

On 2016-12-15 16:02, Kevin Rushforth wrote:

Is it possible that this exception, which seems harmless as far as I can
tell, predates the latest jdk-9+148 jigsaw updates, and that the only
reason we are seeing it now is because of the
"-Dsun.reflect.debugModuleAccessChecks=true" ?

-- Kevin


David Hill wrote:


Alan,

I thought I would toss you the options and the full exception just in
case you see something really obvious.

thanks,
   Dave

public class GradleResolveVisitor extends ResolveVisitor {


Running with jdk build 148, gradle 3.1

ddhill@ddhill-pad:~/sb/9/graphics/rt$ echo $_JAVA_OPTIONS
-Dsun.reflect.debugModuleAccessChecks=true
--add-opens=java.base/java.lang=ALL-UNNAMED
--add-opens=java.base/java.util=ALL-UNNAMED
--add-opens=java.base/java.lang.invoke=ALL-UNNAMED
--add-opens=java.base/java.io=ALL-UNNAMED
--add-opens=java.base/java.util.concurrent=ALL-UNNAMED
--add-opens=java.base/java.text=ALL-UNNAMED

I get this, I think only when a gradle deamon starts.

java.lang.IllegalAccessException: class
org.gradle.groovy.scripts.internal.GradleResolveVisitor cannot access
a member of class org.codehaus.groovy.control.ClassNodeResolver with
modifiers "protected static final"
at
java.base/jdk.internal.reflect.Reflection.throwIllegalAccessException(Reflection.java:418) 



at
java.base/jdk.internal.reflect.Reflection.throwIllegalAccessException(Reflection.java:409) 



at
java.base/jdk.internal.reflect.Reflection.ensureMemberAccess(Reflection.java:111) 



at
java.base/java.lang.reflect.AccessibleObject.slowCheckMemberAccess(AccessibleObject.java:364) 



at
java.base/java.lang.reflect.AccessibleObject.checkAccess(AccessibleObject.java:356) 



at java.base/java.lang.reflect.Field.checkAccess(Field.java:1065)
at java.base/java.lang.reflect.Field.get(Field.java:406)
at
org.gradle.groovy.scripts.internal.GradleResolveVisitor.(GradleResolveVisitor.java:760) 



at
org.gradle.groovy.scripts.internal.DefaultScriptCompilationHandler$CustomCompilationUnit.(DefaultScriptCompilationHandler.java:283) 



at
org.gradle.groovy.scripts.internal.DefaultScriptCompilationHandler$1.createCompilationUnit(DefaultScriptCompilationHandler.java:111) 



at
groovy.lang.GroovyClassLoader.doParseClass(GroovyClassLoader.java:277)
at
groovy.lang.GroovyClassLoader.parseClass(GroovyClassLoader.java:268)
at
org.gradle.groovy.scripts.internal.DefaultScriptCompilationHandler.compileScript(DefaultScriptCompilationHandler.java:129) 



at
org.gradle.groovy.scripts.internal.DefaultScriptCompilationHandler.compileToDir(DefaultScriptCompilationHandler.java:89) 



at
org.gradle.groovy.scripts.internal.FileCacheBackedScriptClassCompiler$CompileToCrossBuildCacheAction.execute(FileCacheBackedScriptClassCompiler.java:153) 



at
org.gradle.groovy.scripts.internal.FileCacheBackedScriptClassCompiler$CompileToCrossBuildCacheAction.execute(FileCacheBackedScriptClassCompiler.java:134) 



at
org.gradle.groovy.scripts.internal.FileCacheBackedScriptClassCompiler$ProgressReportingInitializer.execute(FileCacheBackedScriptClassCompiler.java:177) 



at
org.gradle.groovy.scripts.internal.FileCacheBackedScriptClassCompiler$ProgressReportingInitializer.execute(FileCacheBackedScriptClassCompiler.java:157) 



at
org.gradle.cache.internal.DefaultPersistentDirectoryCache$Initializer.initialize(DefaultPersistentDirectoryCache.java:98) 



at
org.gradle.cache.internal.DefaultCacheAccess$2.run(DefaultCacheAccess.java:104) 



at
org.gradle.cache.internal.DefaultFileLockManager$DefaultFileLock.doWriteAction(DefaultFileLockManager.java:179) 



at
org.gradle.cache.internal.DefaultFileLockManager$DefaultFileLock.writeFile(DefaultFileLockManager.java:169) 



at
org.gradle.cache.internal.DefaultCacheAccess.open(DefaultCacheAccess.java:102) 



at
org.gradle.cache.internal.DefaultPersistentDirectoryStore.open(DefaultPersistentDirectoryStore.java:46) 



at
org.gradle.cache.internal.DefaultPersistentDirectoryStore.open(DefaultPersistentDirectoryStore.java:28) 



at
org.gradle.cache.internal.DefaultCacheFactory.doOpen(DefaultCacheFactory.java:80) 



at
org.gradle.cache.internal.DefaultCacheFactory.open(DefaultCacheFactory.java:50) 



at
org.gradle.cache.internal.DefaultCacheRepository$PersistentCacheBuilder.doOpen(DefaultCacheRepository.java:138) 



at
org.gradle.cache.internal.DefaultCacheRepository$AbstractCacheBuilder.open(DefaultCacheRepository.java:121) 



at
org.gradle.groovy.scripts.internal.FileCacheBackedScriptClassCompiler$RemapBuildScriptsAc

hg: jigsaw/jake/jdk: DEBUG_ADD_OPENS: Anonymize the WARNING exception class

2016-12-15 Thread mark . reinhold
Changeset: 7224d3b718ed
Author:mr
Date:  2016-12-15 07:15 -0800
URL:   http://hg.openjdk.java.net/jigsaw/jake/jdk/rev/7224d3b718ed

DEBUG_ADD_OPENS: Anonymize the WARNING exception class

! src/java.base/share/classes/java/lang/reflect/AccessibleObject.java



Re: 8170987: Module system implementation refresh (12/2016)

2016-12-15 Thread mark . reinhold
2016/12/14 15:31:18 -0800, claes.redes...@oracle.com:
> ...
> 
> WARNING could be a local anonymous class inside
> printStackTraceIfExposedReflectively. ;-)

Good point -- fixed.

- Mark


RFR 8171316: Add IMPLEMENTOR property to the release file

2016-12-15 Thread Sundararajan Athijegannathan

Please review. Bug: https://bugs.openjdk.java.net/browse/JDK-8171316

top level webrev: http://cr.openjdk.java.net/~sundar/8171316/top/webrev.00/
jdk webrev: http://cr.openjdk.java.net/~sundar/8171316/jdk/webrev.00/

Thanks,
-Sundar


Re: RFR 8171316: Add IMPLEMENTOR property to the release file

2016-12-15 Thread Jim Laskey (Oracle)
+1

> On Dec 15, 2016, at 11:32 AM, Sundararajan Athijegannathan 
>  wrote:
> 
> Please review. Bug: https://bugs.openjdk.java.net/browse/JDK-8171316
> 
> top level webrev: http://cr.openjdk.java.net/~sundar/8171316/top/webrev.00/
> jdk webrev: http://cr.openjdk.java.net/~sundar/8171316/jdk/webrev.00/
> 
> Thanks,
> -Sundar



Re: --add-opens on an automatic module ?

2016-12-15 Thread Kevin Rushforth
I can confirm that we see this same exception using jdk-9+146 with 
_JAVA_OPTIONS="-Dsun.reflect.debugModuleAccessChecks=true"


It doesn't seem related to any recent changes then.

-- Kevin


Kevin Rushforth wrote:
Ah, thanks, I missed your email suggesting the same thing. I can test 
this and report back.


-- Kevin

Claes Redestad wrote:

Yes.

"is this something that is logged when you are using
-Dsun.reflect.debugModuleAccessChecks=true? In that case this could be
a pre-existing exception that is/was being swallowed."

http://mail.openjdk.java.net/pipermail/jigsaw-dev/2016-December/010587.html 



/Claes

On 2016-12-15 16:02, Kevin Rushforth wrote:
Is it possible that this exception, which seems harmless as far as I 
can

tell, predates the latest jdk-9+148 jigsaw updates, and that the only
reason we are seeing it now is because of the
"-Dsun.reflect.debugModuleAccessChecks=true" ?

-- Kevin


David Hill wrote:


Alan,

I thought I would toss you the options and the full exception just in
case you see something really obvious.

thanks,
   Dave

public class GradleResolveVisitor extends ResolveVisitor {


Running with jdk build 148, gradle 3.1

ddhill@ddhill-pad:~/sb/9/graphics/rt$ echo $_JAVA_OPTIONS
-Dsun.reflect.debugModuleAccessChecks=true
--add-opens=java.base/java.lang=ALL-UNNAMED
--add-opens=java.base/java.util=ALL-UNNAMED
--add-opens=java.base/java.lang.invoke=ALL-UNNAMED
--add-opens=java.base/java.io=ALL-UNNAMED
--add-opens=java.base/java.util.concurrent=ALL-UNNAMED
--add-opens=java.base/java.text=ALL-UNNAMED

I get this, I think only when a gradle deamon starts.

java.lang.IllegalAccessException: class
org.gradle.groovy.scripts.internal.GradleResolveVisitor cannot access
a member of class org.codehaus.groovy.control.ClassNodeResolver with
modifiers "protected static final"
at
java.base/jdk.internal.reflect.Reflection.throwIllegalAccessException(Reflection.java:418) 



at
java.base/jdk.internal.reflect.Reflection.throwIllegalAccessException(Reflection.java:409) 



at
java.base/jdk.internal.reflect.Reflection.ensureMemberAccess(Reflection.java:111) 



at
java.base/java.lang.reflect.AccessibleObject.slowCheckMemberAccess(AccessibleObject.java:364) 



at
java.base/java.lang.reflect.AccessibleObject.checkAccess(AccessibleObject.java:356) 



at java.base/java.lang.reflect.Field.checkAccess(Field.java:1065)
at java.base/java.lang.reflect.Field.get(Field.java:406)
at
org.gradle.groovy.scripts.internal.GradleResolveVisitor.(GradleResolveVisitor.java:760) 



at
org.gradle.groovy.scripts.internal.DefaultScriptCompilationHandler$CustomCompilationUnit.(DefaultScriptCompilationHandler.java:283) 



at
org.gradle.groovy.scripts.internal.DefaultScriptCompilationHandler$1.createCompilationUnit(DefaultScriptCompilationHandler.java:111) 



at
groovy.lang.GroovyClassLoader.doParseClass(GroovyClassLoader.java:277)
at
groovy.lang.GroovyClassLoader.parseClass(GroovyClassLoader.java:268)
at
org.gradle.groovy.scripts.internal.DefaultScriptCompilationHandler.compileScript(DefaultScriptCompilationHandler.java:129) 



at
org.gradle.groovy.scripts.internal.DefaultScriptCompilationHandler.compileToDir(DefaultScriptCompilationHandler.java:89) 



at
org.gradle.groovy.scripts.internal.FileCacheBackedScriptClassCompiler$CompileToCrossBuildCacheAction.execute(FileCacheBackedScriptClassCompiler.java:153) 



at
org.gradle.groovy.scripts.internal.FileCacheBackedScriptClassCompiler$CompileToCrossBuildCacheAction.execute(FileCacheBackedScriptClassCompiler.java:134) 



at
org.gradle.groovy.scripts.internal.FileCacheBackedScriptClassCompiler$ProgressReportingInitializer.execute(FileCacheBackedScriptClassCompiler.java:177) 



at
org.gradle.groovy.scripts.internal.FileCacheBackedScriptClassCompiler$ProgressReportingInitializer.execute(FileCacheBackedScriptClassCompiler.java:157) 



at
org.gradle.cache.internal.DefaultPersistentDirectoryCache$Initializer.initialize(DefaultPersistentDirectoryCache.java:98) 



at
org.gradle.cache.internal.DefaultCacheAccess$2.run(DefaultCacheAccess.java:104) 



at
org.gradle.cache.internal.DefaultFileLockManager$DefaultFileLock.doWriteAction(DefaultFileLockManager.java:179) 



at
org.gradle.cache.internal.DefaultFileLockManager$DefaultFileLock.writeFile(DefaultFileLockManager.java:169) 



at
org.gradle.cache.internal.DefaultCacheAccess.open(DefaultCacheAccess.java:102) 



at
org.gradle.cache.internal.DefaultPersistentDirectoryStore.open(DefaultPersistentDirectoryStore.java:46) 



at
org.gradle.cache.internal.DefaultPersistentDirectoryStore.open(DefaultPersistentDirectoryStore.java:28) 



at
org.gradle.cache.internal.DefaultCacheFactory.doOpen(DefaultCacheFactory.java:80) 



at
org.gradle.cache.internal.DefaultCacheFactory.open(DefaultCacheFactory.java:50) 



at
org.gradle.cache.internal.DefaultCacheRepository$PersistentCacheBuilder.doOpen(DefaultCacheRepository.java:138) 


Re: RFR 8171316: Add IMPLEMENTOR property to the release file

2016-12-15 Thread Erik Joelsson

Looks good to me.

/Erik


On 2016-12-15 16:32, Sundararajan Athijegannathan wrote:

Please review. Bug: https://bugs.openjdk.java.net/browse/JDK-8171316

top level webrev: 
http://cr.openjdk.java.net/~sundar/8171316/top/webrev.00/

jdk webrev: http://cr.openjdk.java.net/~sundar/8171316/jdk/webrev.00/

Thanks,
-Sundar




Re: RFR 8171316: Add IMPLEMENTOR property to the release file

2016-12-15 Thread Mandy Chung

> On Dec 15, 2016, at 7:32 AM, Sundararajan Athijegannathan 
>  wrote:
> 
> Please review. Bug: https://bugs.openjdk.java.net/browse/JDK-8171316
> 
> top level webrev: http://cr.openjdk.java.net/~sundar/8171316/top/webrev.00/
> jdk webrev: http://cr.openjdk.java.net/~sundar/8171316/jdk/webrev.00/

Looks okay.

Mandy



Re: hg: jigsaw/jake/jdk: DEBUG_ADD_OPENS: Anonymize the WARNING exception class

2016-12-15 Thread Remi Forax
The other solution is to use the new StackWalker API.

Rémi

- Mail original -
> De: "mark reinhold" 
> À: jigsaw-dev@openjdk.java.net
> Envoyé: Jeudi 15 Décembre 2016 16:16:09
> Objet: hg: jigsaw/jake/jdk: DEBUG_ADD_OPENS: Anonymize the WARNING exception  
> class

> Changeset: 7224d3b718ed
> Author:mr
> Date:  2016-12-15 07:15 -0800
> URL:   http://hg.openjdk.java.net/jigsaw/jake/jdk/rev/7224d3b718ed
> 
> DEBUG_ADD_OPENS: Anonymize the WARNING exception class
> 
> ! src/java.base/share/classes/java/lang/reflect/AccessibleObject.java


Re: 8170987: Module system implementation refresh (12/2016)

2016-12-15 Thread Alan Bateman

On 15/12/2016 14:13, Claes Redestad wrote:



The context here, I assume, is the increased startup cost to initialize
java.util.regex in 9 (and a few regression fixes related to this that
I've done in the area which may have involved avoiding adding a
regex-free fast path for trivial but common cases):
Yes although it's not an issue at this time.. Looking at it again then 
we should be able to decompose it at link time and generate code that 
reconstitutes it from its parts. That would avoid needing to reparse at 
startup.


-Alan


Re: 8170987: Module system implementation refresh (12/2016)

2016-12-15 Thread Mandy Chung

> On Dec 15, 2016, at 10:13 AM, Alan Bateman  wrote:
> 
> On 15/12/2016 14:13, Claes Redestad wrote:
> 
>> 
>> The context here, I assume, is the increased startup cost to initialize
>> java.util.regex in 9 (and a few regression fixes related to this that
>> I've done in the area which may have involved avoiding adding a
>> regex-free fast path for trivial but common cases):
> Yes although it's not an issue at this time.. Looking at it again then we 
> should be able to decompose it at link time and generate code that 
> reconstitutes it from its parts. That would avoid needing to reparse at 
> startup.

That’s one possibility that we could consider in the future.

Mandy



Review Request JDK-8171323: generate dot file for java.se and java.se.ee with only API dependences

2016-12-15 Thread Mandy Chung
This updates the GenGraphs build tool to generate a dot file for
`java.se` and `java.se.ee` modules including API dependences only
that can be used to display Java SE module graph.

http://cr.openjdk.java.net/~mchung/jdk9/webrevs/8171323/webrev.00/

Mandy


hg: jigsaw/jake/jdk: SystemModuleFinder.Hashes class not needed - review feedback from Claes

2016-12-15 Thread mandy . chung
Changeset: 9db6639ded4c
Author:mchung
Date:  2016-12-15 13:05 -0800
URL:   http://hg.openjdk.java.net/jigsaw/jake/jdk/rev/9db6639ded4c

SystemModuleFinder.Hashes class not needed - review feedback from Claes

! src/java.base/share/classes/jdk/internal/module/SystemModuleFinder.java



hg: jigsaw/jake/jdk: 2 new changesets

2016-12-15 Thread alan . bateman
Changeset: 190ca89e298e
Author:alanb
Date:  2016-12-15 21:24 +
URL:   http://hg.openjdk.java.net/jigsaw/jake/jdk/rev/190ca89e298e

Recorded hashes not preserved when patching

! src/java.base/share/classes/jdk/internal/module/ModulePatcher.java

Changeset: c02bcacee98f
Author:alanb
Date:  2016-12-15 21:24 +
URL:   http://hg.openjdk.java.net/jigsaw/jake/jdk/rev/c02bcacee98f

Merge




hg: jigsaw/jake/jdk: jmod/jar tool: Document extra options in help

2016-12-15 Thread chris . hegarty
Changeset: 1bd62b2bc515
Author:chegar
Date:  2016-12-15 21:28 +
URL:   http://hg.openjdk.java.net/jigsaw/jake/jdk/rev/1bd62b2bc515

jmod/jar tool: Document extra options in help

! src/jdk.jartool/share/classes/sun/tools/jar/GNUStyleOptions.java
! src/jdk.jartool/share/classes/sun/tools/jar/Main.java
! src/jdk.jartool/share/classes/sun/tools/jar/resources/jar.properties
! src/jdk.jlink/share/classes/jdk/tools/jmod/JmodTask.java
! src/jdk.jlink/share/classes/jdk/tools/jmod/resources/jmod.properties
! test/jdk/modules/incubator/DefaultImage.java
! test/tools/jar/compat/CLICompatibility.java
! test/tools/jmod/JmodTest.java



Re: NCDFE on jdk.internal.reflect.SerializationConstructorAccessorImpl

2016-12-15 Thread David Holmes

Hi Andrew,

I'm redirecting this to jigsaw-dev as it seems to be a modularity 
related problem.


Additional comment below ...

David

On 16/12/2016 7:48 AM, Andrew Guibert wrote:



Hello all,

I've been doing some experimentation with WebSphere Liberty on Java 9 and
ran into a problem that I believe is specific to the hotspot 9 JVM.  I am
using a Liberty image compiled with Java 7, and am trying to get the server
running with Java 9 at runtime.  So far things are working with the IBM JDK
I have access to, but with the openjdk builds the boot process fails
immediately.

When I try to boot Liberty with OpenJDK (here I used 9-ea+149) I get a
NCDFE as indicated in the title (see end of message for full stack trace).
I believe this same issue may have been reported by Jon Berg back in April
[1] but it looks like he didn't follow up on his initial note when asked
for more info.

I've done some digging and I believe that this error was introduced when
classes were moved from sun.reflect to jdk.internal.reflect [2],
specifically when sun.reflect.MagicAccessorImpl was moved to
jdk.internal.reflect.MagicAccessorImpl.  According to the javadoc of
MagicAccessorImpl, there are special tolerences in the VM which allow
MagicAccessorImpl and its subclasses to bypass verification, and the
javadoc also warns not to change the name of MagicAccessorImpl without
updating the corresponding VM code. Since this was just indicated in a
class-level javadoc comment, it could have been easily missed. The
MagicAccessorImpl javadoc references bug 4486457, but I have not been able
to find this id number in any public bug repository.


No it isn't public. Basically when the code-generating reflection 
mechanism was introduced verification had to be bypassed because the 
generated code didn't obey the expected subclassing rules for protected 
access - hence MagicAccessor.



Switching over the the VM codebase, as far as I can tell everything has
been updated properly, except for a reference in systemDictionary.hpp [3]
which refers to MagicAccessorImpl as reflect_MagicAccessorImpl.  I assume
this should instead be jdk_internal_reflect_MagicAccessorImpl (and other
class entries in the block of lines 145-151 also seem to be missing the
"jdk_internal_" prefix).


No those are just variable names that get mapped to full symbolic names 
e.g.:


./share/vm/classfile/vmSymbols.hpp:  template(reflect_MagicAccessorImpl, 
"jdk/internal/reflect/MagicAccessorImpl")


David
-


I haven't been able to reproduce this error in a standalone test case.
However, if anyone wants to see the error for themselves the issue can be
reproduced with Liberty in a matter of minutes by downloading a Liberty
zip, extracting it, and doing wlp/bin/server create myServer &&
wlp/bin/server run myServer with jdk9 set as $JAVA_HOME in the environment.

[1] http://mail.openjdk.java.net/pipermail/jdk9-dev/2016-April/004121.html
[2] http://hg.openjdk.java.net/jdk9/jdk9/jdk/rev/8606d027b2c2
[3]
http://hg.openjdk.java.net/jdk9/hs/hotspot/file/545ddc149651/src/share/vm/classfile/systemDictionary.hpp#l145

And finally, here is the stack trace:

[12/15/16, 12:50:41:368 CST] 0010 LogService-8-com.ibm.ws.config
E CWWKE0701E: FrameworkEvent ERROR Bundle:com.ibm.ws.config(id=8)
org.osgi.framework.BundleException: Exception in
com.ibm.ws.config.internal.WSConfigActivator.start() of bundle
com.ibm.ws.config
  at org.eclipse.osgi.internal.framework.BundleContextImpl.startActivator
(BundleContextImpl.java:795)
  at org.eclipse.osgi.internal.framework.BundleContextImpl.start
(BundleContextImpl.java:724)
  at org.eclipse.osgi.internal.framework.EquinoxBundle.startWorker0
(EquinoxBundle.java:932)
  at org.eclipse.osgi.internal.framework.EquinoxBundle
$EquinoxModule.startWorker(EquinoxBundle.java:309)
  at org.eclipse.osgi.container.Module.doStart(Module.java:581)
  at org.eclipse.osgi.container.Module.start(Module.java:449)
  at org.eclipse.osgi.container.ModuleContainer
$ContainerStartLevel.incStartLevel(ModuleContainer.java:1620)
  at org.eclipse.osgi.container.ModuleContainer
$ContainerStartLevel.incStartLevel(ModuleContainer.java:1600)
  at org.eclipse.osgi.container.ModuleContainer
$ContainerStartLevel.doContainerStartLevel(ModuleContainer.java:1571)
  at org.eclipse.osgi.container.ModuleContainer
$ContainerStartLevel.dispatchEvent(ModuleContainer.java:1514)
  at org.eclipse.osgi.container.ModuleContainer
$ContainerStartLevel.dispatchEvent(ModuleContainer.java:1)
  at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent
(EventManager.java:230)
  at org.eclipse.osgi.framework.eventmgr.EventManager$EventThread.run
(EventManager.java:340)
Caused by: java.lang.NoClassDefFoundError:
jdk/internal/reflect/SerializationConstructorAccessorImpl
  at java.base/jdk.internal.misc.Unsafe.defineClass0(Native Method)
  at java.base/jdk.internal.misc.Unsafe.defineClass(Unsafe.java:1173)
  at java.base/jdk.internal.reflect.ClassDefiner.defineClass
(ClassDefiner.java:63)

Re: Review Request JDK-8171323: generate dot file for java.se and java.se.ee with only API dependences

2016-12-15 Thread Paul Sandoz

> On 15 Dec 2016, at 10:53, Mandy Chung  wrote:
> 
> This updates the GenGraphs build tool to generate a dot file for
> `java.se` and `java.se.ee` modules including API dependences only
> that can be used to display Java SE module graph.
> 
> http://cr.openjdk.java.net/~mchung/jdk9/webrevs/8171323/webrev.00/
> 

Looks ok.

You can marginally improve genDotFile:


List mds = cf.modules().stream()
  .map(ResolvedModule::reference)
  .map(ModuleReference::descriptor)
  .collect(toList());

…

  printGraph(out, name, gengraph(cf), 
mds.stream().collect(toMap(ModuleDescriptor::name, Function.identity()));

…

printGraph(out, name, graph,
mds.stream()
.filter(md -> !md.name().startsWith("jdk.”) && 
graph.nodes().contains(md.name()))
.collect(toMap(ModuleDescriptor::name, Function.identity()))

Paul.


Re: Review Request JDK-8171323: generate dot file for java.se and java.se.ee with only API dependences

2016-12-15 Thread Mandy Chung

> On Dec 15, 2016, at 5:12 PM, Paul Sandoz  wrote:
> 
> 
>> On 15 Dec 2016, at 10:53, Mandy Chung  wrote:
>> 
>> This updates the GenGraphs build tool to generate a dot file for
>> `java.se` and `java.se.ee` modules including API dependences only
>> that can be used to display Java SE module graph.
>> 
>> http://cr.openjdk.java.net/~mchung/jdk9/webrevs/8171323/webrev.00/
>> 
> 
> Looks ok.
> 
> You can marginally improve genDotFile:
> 
> 
> List mds = cf.modules().stream()
>  .map(ResolvedModule::reference)
>  .map(ModuleReference::descriptor)
>  .collect(toList());
> 
> …
> 
>  printGraph(out, name, gengraph(cf), 
> mds.stream().collect(toMap(ModuleDescriptor::name, Function.identity()));
> 
> …
> 
> printGraph(out, name, graph,
>mds.stream()
>.filter(md -> !md.name().startsWith("jdk.”) && 
> graph.nodes().contains(md.name()))
>.collect(toMap(ModuleDescriptor::name, Function.identity()))


Sure I can clean that up.  Thanks.

Mandy