Issue #271211 - NullPointerException at com.sun.tools.javac.comp.Enter.lambda$visitTopLevel$1 - fixed.
1.1 --- a/make/netbeans/nb-javac/nbproject/build-impl.xml Mon Jul 31 11:07:41 2017 +0200
1.2 +++ b/make/netbeans/nb-javac/nbproject/build-impl.xml Fri Aug 04 13:32:32 2017 +0200
1.3 @@ -339,10 +339,18 @@
1.4 <attribute default="${includes}" name="includes"/>
1.5 <attribute default="${excludes}" name="excludes"/>
1.6 <attribute default="${javac.debug}" name="debug"/>
1.7 - <attribute default="${empty.dir}" name="sourcepath"/>
1.8 + <attribute default="${empty.dir}" name="sourcepath" unless:set="named.module.internal"/>
1.9 + <attribute default="${src.classes2.dir}:${src.classes3.dir}:${src.classes5.dir}:${src.classes4.dir}" if:set="named.module.internal" name="sourcepath"/>
1.10 <attribute default="${empty.dir}" name="gensrcdir"/>
1.11 <element name="customize" optional="true"/>
1.12 <sequential>
1.13 + <condition property="warn.excludes.internal">
1.14 + <and>
1.15 + <isset property="named.module.internal"/>
1.16 + <length length="0" string="@{excludes}" trim="true" when="greater"/>
1.17 + </and>
1.18 + </condition>
1.19 + <echo if:set="warn.excludes.internal" level="warning" message="The javac excludes are not supported in the JDK 9 Named Module."/>
1.20 <property location="${build.dir}/empty" name="empty.dir"/>
1.21 <mkdir dir="${empty.dir}"/>
1.22 <mkdir dir="@{apgeneratedsrcdir}"/>
1.23 @@ -1562,7 +1570,13 @@
1.24 </target>
1.25 <target depends="-init-source-module-properties" if="named.module.internal" name="-init-test-javac-module-properties-with-module">
1.26 <j2seproject3:modulename property="test.module.name" sourcepath="${test.test.dir}"/>
1.27 - <condition else="-Xmodule:${module.name} --add-reads ${module.name}=ALL-UNNAMED" property="javac.test.compilerargs" value="--add-reads ${test.module.name}=ALL-UNNAMED">
1.28 + <condition else="${empty.dir}" property="javac.test.sourcepath" value="${test.test.dir}">
1.29 + <and>
1.30 + <isset property="test.module.name"/>
1.31 + <length length="0" string="${test.module.name}" when="greater"/>
1.32 + </and>
1.33 + </condition>
1.34 + <condition else="--patch-module ${module.name}=${test.test.dir} --add-reads ${module.name}=ALL-UNNAMED" property="javac.test.compilerargs" value="--add-reads ${test.module.name}=ALL-UNNAMED">
1.35 <and>
1.36 <isset property="test.module.name"/>
1.37 <length length="0" string="${test.module.name}" when="greater"/>
1.38 @@ -1597,6 +1611,7 @@
1.39 </condition>
1.40 </target>
1.41 <target depends="-init-source-module-properties" name="-init-test-module-properties-without-module" unless="named.module.internal">
1.42 + <property name="javac.test.sourcepath" value="${empty.dir}"/>
1.43 <property name="javac.test.compilerargs" value=""/>
1.44 <property name="run.test.jvmargs" value=""/>
1.45 </target>
1.46 @@ -1605,7 +1620,7 @@
1.47 <j2seproject3:depend classpath="${javac.test.classpath}" destdir="${build.test.classes.dir}" srcdir="${test.test.dir}"/>
1.48 </target>
1.49 <target depends="init,deps-jar,compile,-init-test-module-properties,-pre-pre-compile-test,-pre-compile-test,-compile-test-depend" if="have.tests" name="-do-compile-test">
1.50 - <j2seproject3:javac apgeneratedsrcdir="${build.test.classes.dir}" classpath="${javac.test.classpath}" debug="true" destdir="${build.test.classes.dir}" modulepath="${javac.test.modulepath}" processorpath="${javac.test.processorpath}" srcdir="${test.test.dir}">
1.51 + <j2seproject3:javac apgeneratedsrcdir="${build.test.classes.dir}" classpath="${javac.test.classpath}" debug="true" destdir="${build.test.classes.dir}" modulepath="${javac.test.modulepath}" processorpath="${javac.test.processorpath}" sourcepath="${javac.test.sourcepath}" srcdir="${test.test.dir}">
1.52 <customize>
1.53 <compilerarg line="${javac.test.compilerargs}"/>
1.54 </customize>
2.1 --- a/make/netbeans/nb-javac/nbproject/genfiles.properties Mon Jul 31 11:07:41 2017 +0200
2.2 +++ b/make/netbeans/nb-javac/nbproject/genfiles.properties Fri Aug 04 13:32:32 2017 +0200
2.3 @@ -4,5 +4,5 @@
2.4 # This file is used by a NetBeans-based IDE to track changes in generated files such as build-impl.xml.
2.5 # Do not edit this file. You may delete it but then the IDE will never regenerate such files for you.
2.6 nbproject/build-impl.xml.data.CRC32=716b253f
2.7 -nbproject/build-impl.xml.script.CRC32=a1dd8e75
2.8 -nbproject/build-impl.xml.stylesheet.CRC32=b9adb2c8@1.88.0.48
2.9 +nbproject/build-impl.xml.script.CRC32=7f8d6ed3
2.10 +nbproject/build-impl.xml.stylesheet.CRC32=bade6ae5@1.88.0.48
3.1 --- a/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/Enter.java Mon Jul 31 11:07:41 2017 +0200
3.2 +++ b/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/Enter.java Fri Aug 04 13:32:32 2017 +0200
3.3 @@ -389,7 +389,7 @@
3.4 syms.listPackageModules(tree.packge.fullname)
3.5 .stream()
3.6 .filter(m -> m != tree.modle)
3.7 - .filter(cand -> visiblePackages.get(tree.packge.fullname) == syms.getPackage(cand, tree.packge.fullname))
3.8 + .filter(cand -> visiblePackages != null && visiblePackages.get(tree.packge.fullname) == syms.getPackage(cand, tree.packge.fullname))
3.9 .findAny();
3.10
3.11 if (dependencyWithPackage.isPresent()) {