# HG changeset patch # User Dusan Balek # Date 1506078606 -7200 # Node ID 0911c6d1f67170a7b2e602f382a792fd8eebe30d # Parent 740e1ee04027db4d6be7c275558b374dd81b45ea Issue #256966 - NullPointerException at com.sun.tools.javac.comp.Check.checkImportedPackagesObservable - fixed. diff -r 740e1ee04027 -r 0911c6d1f671 src/jdk.compiler/share/classes/com/sun/tools/javac/comp/Check.java --- a/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/Check.java Fri Sep 01 15:28:56 2017 +0200 +++ b/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/Check.java Fri Sep 22 13:10:06 2017 +0200 @@ -3722,7 +3722,7 @@ if (!imp.staticImport && TreeInfo.name(imp.qualid) == names.asterisk && ((JCFieldAccess)imp.qualid).selected.type != null) { TypeSymbol tsym = ((JCFieldAccess)imp.qualid).selected.type.tsym; - if (toplevel.modle.visiblePackages != null) { + if (toplevel.modle != null && toplevel.modle.visiblePackages != null) { //TODO - unclear: selects like javax.* will get resolved from the current module //(as javax is not an exported package from any module). And as javax in the current //module typically does not contain any classes or subpackages, we need to go through