update org.eclipse.jdt.core to S_4_8_0_RC3
diff --git a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/ModuleCompilationTests.java b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/ModuleCompilationTests.java
index 12370b2..4524975 100644
--- a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/ModuleCompilationTests.java
+++ b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/ModuleCompilationTests.java
@@ -37,7 +37,7 @@
 public class ModuleCompilationTests extends AbstractBatchCompilerTest {
 
 	static {
-//		 TESTS_NAMES = new String[] { "testPackageConflict4a" };
+//		 TESTS_NAMES = new String[] { "test_npe_bug535107" };
 		// TESTS_NUMBERS = new int[] { 1 };
 		// TESTS_RANGE = new int[] { 298, -1 };
 	}
@@ -4905,4 +4905,26 @@
 		String fileName = OUTPUT_DIR + File.separator + out + File.separator + "mod.one" + File.separator + "module-info.class";
 		assertClassFile("Missing modul-info.class: " + fileName, fileName, classFiles);
 	}
+	public void test_npe_bug535107() {
+		runConformModuleTest(
+				new String[] {
+					"p/X.java",
+					"package p;\n" +
+			  		"import java.lang.annotation.*;\n" + 
+					"@Target(ElementType.MODULE)\n" +
+					"public @interface X {\n" +
+					"	ElementType value();\n" + 
+					"}",
+					"module-info.java",
+			  		"import java.lang.annotation.*;\n" + 
+			  		"@p.X(ElementType.MODULE)\n" + 
+					"module mod.one { \n" +
+					"}"
+		        },
+				" -9 \"" + OUTPUT_DIR +  File.separator + "module-info.java\" "
+		        + "\"" + OUTPUT_DIR +  File.separator + "p/X.java\"",
+		        "",
+		        "",
+		        true);
+	}
 }
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/QualifiedNameReference.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/QualifiedNameReference.java
index f2167e1..48096c5 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/QualifiedNameReference.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/QualifiedNameReference.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2015 IBM Corporation and others.
+ * Copyright (c) 2000, 2018 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -1257,7 +1257,8 @@
 						// only last field is actually a write access if any
 						// check if accessing enum static field in initializer
 						if (declaringClass.isEnum()) {
-							if ((TypeBinding.equalsEquals(sourceType, declaringClass) || TypeBinding.equalsEquals(sourceType.superclass, declaringClass)) // enum constant body
+							if ((TypeBinding.equalsEquals(sourceType, declaringClass) || 
+									(sourceType != null && TypeBinding.equalsEquals(sourceType.superclass, declaringClass))) // enum constant body
 									&& fieldBinding.constant(scope) == Constant.NotAConstant
 									&& !methodScope.isStatic
 									&& methodScope.isInsideInitializerOrConstructor()) {