Merge remote-tracking branch 'origin/master' into BETA_JAVA14


Change-Id: I452c9885fbec2fa7f3452dc3d4f8b6f64378f367
diff --git a/org.eclipse.jdt.annotation/pom.xml b/org.eclipse.jdt.annotation/pom.xml
index c9369c5..5b30b43 100644
--- a/org.eclipse.jdt.annotation/pom.xml
+++ b/org.eclipse.jdt.annotation/pom.xml
@@ -14,7 +14,7 @@
   <parent>
     <artifactId>eclipse.jdt.core</artifactId>
     <groupId>eclipse.jdt.core</groupId>
-    <version>4.14.0-SNAPSHOT</version>
+    <version>4.15.0-SNAPSHOT</version>
   </parent>
   <groupId>org.eclipse.jdt</groupId>
   <artifactId>org.eclipse.jdt.annotation</artifactId>
diff --git a/org.eclipse.jdt.annotation_v1/pom.xml b/org.eclipse.jdt.annotation_v1/pom.xml
index c14801d..414920f 100644
--- a/org.eclipse.jdt.annotation_v1/pom.xml
+++ b/org.eclipse.jdt.annotation_v1/pom.xml
@@ -14,7 +14,7 @@
   <parent>
     <artifactId>eclipse.jdt.core</artifactId>
     <groupId>eclipse.jdt.core</groupId>
-    <version>4.14.0-SNAPSHOT</version>
+    <version>4.15.0-SNAPSHOT</version>
   </parent>
   <groupId>org.eclipse.jdt</groupId>
   <artifactId>org.eclipse.jdt.annotation</artifactId>
diff --git a/org.eclipse.jdt.apt.core/pom.xml b/org.eclipse.jdt.apt.core/pom.xml
index d6b10df..5845a8a 100644
--- a/org.eclipse.jdt.apt.core/pom.xml
+++ b/org.eclipse.jdt.apt.core/pom.xml
@@ -14,7 +14,7 @@
   <parent>
     <artifactId>eclipse.jdt.core</artifactId>
     <groupId>eclipse.jdt.core</groupId>
-    <version>4.14.0-SNAPSHOT</version>
+    <version>4.15.0-SNAPSHOT</version>
   </parent>
   <groupId>org.eclipse.jdt</groupId>
   <artifactId>org.eclipse.jdt.apt.core</artifactId>
diff --git a/org.eclipse.jdt.apt.pluggable.core/pom.xml b/org.eclipse.jdt.apt.pluggable.core/pom.xml
index c4be2dc..48d8326 100644
--- a/org.eclipse.jdt.apt.pluggable.core/pom.xml
+++ b/org.eclipse.jdt.apt.pluggable.core/pom.xml
@@ -14,7 +14,7 @@
   <parent>
     <artifactId>eclipse.jdt.core</artifactId>
     <groupId>eclipse.jdt.core</groupId>
-    <version>4.14.0-SNAPSHOT</version>
+    <version>4.15.0-SNAPSHOT</version>
   </parent>
   <groupId>org.eclipse.jdt</groupId>
   <artifactId>org.eclipse.jdt.apt.pluggable.core</artifactId>
diff --git a/org.eclipse.jdt.apt.pluggable.tests/pom.xml b/org.eclipse.jdt.apt.pluggable.tests/pom.xml
index 4090363..e171355 100644
--- a/org.eclipse.jdt.apt.pluggable.tests/pom.xml
+++ b/org.eclipse.jdt.apt.pluggable.tests/pom.xml
@@ -15,7 +15,7 @@
   <parent>
     <artifactId>tests-pom</artifactId>
     <groupId>eclipse.jdt.core</groupId>
-    <version>4.14.0-SNAPSHOT</version>
+    <version>4.15.0-SNAPSHOT</version>
     <relativePath>../tests-pom/</relativePath>
   </parent>
   <groupId>org.eclipse.jdt</groupId>
diff --git a/org.eclipse.jdt.apt.tests/pom.xml b/org.eclipse.jdt.apt.tests/pom.xml
index 9ec0fee..9bd697a 100644
--- a/org.eclipse.jdt.apt.tests/pom.xml
+++ b/org.eclipse.jdt.apt.tests/pom.xml
@@ -15,7 +15,7 @@
   <parent>
     <artifactId>tests-pom</artifactId>
     <groupId>eclipse.jdt.core</groupId>
-    <version>4.14.0-SNAPSHOT</version>
+    <version>4.15.0-SNAPSHOT</version>
     <relativePath>../tests-pom/</relativePath>
   </parent>
   <groupId>org.eclipse.jdt</groupId>
diff --git a/org.eclipse.jdt.apt.ui/pom.xml b/org.eclipse.jdt.apt.ui/pom.xml
index 822d39d..089dcc8 100644
--- a/org.eclipse.jdt.apt.ui/pom.xml
+++ b/org.eclipse.jdt.apt.ui/pom.xml
@@ -14,7 +14,7 @@
   <parent>
     <artifactId>eclipse.jdt.core</artifactId>
     <groupId>eclipse.jdt.core</groupId>
-    <version>4.14.0-SNAPSHOT</version>
+    <version>4.15.0-SNAPSHOT</version>
   </parent>
   <groupId>org.eclipse.jdt</groupId>
   <artifactId>org.eclipse.jdt.apt.ui</artifactId>
diff --git a/org.eclipse.jdt.compiler.apt.tests/pom.xml b/org.eclipse.jdt.compiler.apt.tests/pom.xml
index 69a0d98..1a7eac6 100644
--- a/org.eclipse.jdt.compiler.apt.tests/pom.xml
+++ b/org.eclipse.jdt.compiler.apt.tests/pom.xml
@@ -15,7 +15,7 @@
   <parent>
     <artifactId>tests-pom</artifactId>
     <groupId>eclipse.jdt.core</groupId>
-    <version>4.14.0-SNAPSHOT</version>
+    <version>4.15.0-SNAPSHOT</version>
     <relativePath>../tests-pom/</relativePath>
   </parent>
   <groupId>org.eclipse.jdt</groupId>
diff --git a/org.eclipse.jdt.compiler.apt/pom.xml b/org.eclipse.jdt.compiler.apt/pom.xml
index 26133e0..95fb78f 100644
--- a/org.eclipse.jdt.compiler.apt/pom.xml
+++ b/org.eclipse.jdt.compiler.apt/pom.xml
@@ -14,7 +14,7 @@
   <parent>
     <artifactId>eclipse.jdt.core</artifactId>
     <groupId>eclipse.jdt.core</groupId>
-    <version>4.14.0-SNAPSHOT</version>
+    <version>4.15.0-SNAPSHOT</version>
   </parent>
   <groupId>org.eclipse.jdt</groupId>
   <artifactId>org.eclipse.jdt.compiler.apt</artifactId>
diff --git a/org.eclipse.jdt.compiler.tool.tests/pom.xml b/org.eclipse.jdt.compiler.tool.tests/pom.xml
index 6960622..91d3f63 100644
--- a/org.eclipse.jdt.compiler.tool.tests/pom.xml
+++ b/org.eclipse.jdt.compiler.tool.tests/pom.xml
@@ -15,7 +15,7 @@
   <parent>
     <artifactId>tests-pom</artifactId>
     <groupId>eclipse.jdt.core</groupId>
-    <version>4.14.0-SNAPSHOT</version>
+    <version>4.15.0-SNAPSHOT</version>
     <relativePath>../tests-pom/</relativePath>
   </parent>
   <groupId>org.eclipse.jdt</groupId>
diff --git a/org.eclipse.jdt.compiler.tool/pom.xml b/org.eclipse.jdt.compiler.tool/pom.xml
index 29632bf..9e591be 100644
--- a/org.eclipse.jdt.compiler.tool/pom.xml
+++ b/org.eclipse.jdt.compiler.tool/pom.xml
@@ -14,7 +14,7 @@
   <parent>
     <artifactId>eclipse.jdt.core</artifactId>
     <groupId>eclipse.jdt.core</groupId>
-    <version>4.14.0-SNAPSHOT</version>
+    <version>4.15.0-SNAPSHOT</version>
   </parent>
   <groupId>org.eclipse.jdt</groupId>
   <artifactId>org.eclipse.jdt.compiler.tool</artifactId>
diff --git a/org.eclipse.jdt.core.tests.builder/pom.xml b/org.eclipse.jdt.core.tests.builder/pom.xml
index e6d81e7..ab2977f 100644
--- a/org.eclipse.jdt.core.tests.builder/pom.xml
+++ b/org.eclipse.jdt.core.tests.builder/pom.xml
@@ -14,7 +14,7 @@
   <parent>
     <artifactId>tests-pom</artifactId>
     <groupId>eclipse.jdt.core</groupId>
-    <version>4.14.0-SNAPSHOT</version>
+    <version>4.15.0-SNAPSHOT</version>
     <relativePath>../tests-pom/</relativePath>
   </parent>
   <groupId>org.eclipse.jdt</groupId>
diff --git a/org.eclipse.jdt.core.tests.compiler/META-INF/MANIFEST.MF b/org.eclipse.jdt.core.tests.compiler/META-INF/MANIFEST.MF
index 06473e3..acfe834 100644
--- a/org.eclipse.jdt.core.tests.compiler/META-INF/MANIFEST.MF
+++ b/org.eclipse.jdt.core.tests.compiler/META-INF/MANIFEST.MF
@@ -2,7 +2,7 @@
 Bundle-ManifestVersion: 2
 Bundle-Name: %pluginName
 Bundle-SymbolicName: org.eclipse.jdt.core.tests.compiler;singleton:=true
-Bundle-Version: 3.12.1000.qualifier
+Bundle-Version: 3.12.1100.qualifier
 Bundle-Vendor: %providerName
 Bundle-Localization: plugin
 Export-Package: org.eclipse.jdt.core.tests.compiler,
diff --git a/org.eclipse.jdt.core.tests.compiler/pom.xml b/org.eclipse.jdt.core.tests.compiler/pom.xml
index 648d3b6..a32a799 100644
--- a/org.eclipse.jdt.core.tests.compiler/pom.xml
+++ b/org.eclipse.jdt.core.tests.compiler/pom.xml
@@ -15,12 +15,12 @@
   <parent>
     <artifactId>tests-pom</artifactId>
     <groupId>eclipse.jdt.core</groupId>
-    <version>4.14.0-SNAPSHOT</version>
+    <version>4.15.0-SNAPSHOT</version>
     <relativePath>../tests-pom/</relativePath>
   </parent>
   <groupId>org.eclipse.jdt</groupId>
   <artifactId>org.eclipse.jdt.core.tests.compiler</artifactId>
-  <version>3.12.1000-SNAPSHOT</version>
+  <version>3.12.1100-SNAPSHOT</version>
   <packaging>eclipse-test-plugin</packaging>
 
   <properties>
diff --git a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/AbstractRegressionTest.java b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/AbstractRegressionTest.java
index 7939b3f..f47faab 100644
--- a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/AbstractRegressionTest.java
+++ b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/AbstractRegressionTest.java
@@ -2516,7 +2516,7 @@
 		if (!directory.exists())
 			return;
 		Files.walk(directory.toPath())
-			.filter(f -> f.endsWith(SuffixConstants.SUFFIX_STRING_java))
+			.filter(f -> f.toString().endsWith(SuffixConstants.SUFFIX_STRING_java))
 			.map(java.nio.file.Path::toFile)
 			.filter(File::isFile)
 			.forEach(File::delete);
diff --git a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/GenericsRegressionTest_1_8.java b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/GenericsRegressionTest_1_8.java
index fcf06d9..65a5618 100644
--- a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/GenericsRegressionTest_1_8.java
+++ b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/GenericsRegressionTest_1_8.java
@@ -10006,4 +10006,39 @@
 			"The method define(FuncN, TODO[]) is ambiguous for the type Test\n" + 
 			"----------\n");
 	}
+
+	public void testBug534223() {
+		Runner runner = new Runner();
+		String sourceX =
+				"package p;\n" +
+				"public class X {\n" +
+				"	<S> void m() {\n" +
+				"		Runnable r = () -> {\n" +
+				"			IFC<S> i = new IFC<S>() {\n" +
+				"				public void n(S s) {}\n" +
+				"			};\n" +
+				"			if (i != null)\n" +
+				"				System.out.println(i);\n" +
+				"		};\n" +
+				"		r.run();\n" +
+				"	}\n" +
+				"}\n";
+		runner.testFiles = new String[] {
+				"p/IFC.java",
+				"package p;\n" +
+				"public interface IFC<T> {\n" +
+				"	void n(T t);\n" +
+				"}\n",
+				"p/X.java",
+				sourceX
+			};
+		runner.runConformTest();
+		runner.shouldFlushOutputDirectory = false;
+		runner.testFiles = new String[] {
+				"p/X.java",
+				sourceX			
+			};
+		runner.runConformTest(); // don't use pre-compiled p/X$1.class
+	}
+
 }
diff --git a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/LambdaExpressionsTest.java b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/LambdaExpressionsTest.java
index 5be3c39..b110757 100644
--- a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/LambdaExpressionsTest.java
+++ b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/LambdaExpressionsTest.java
@@ -6846,6 +6846,109 @@
 		"A.m"		
 	);
 }
+public void testBug553885a() {
+	runConformTest(
+			new String[] {
+					"p2/Test.java",
+						"package p2;\n" +
+						"import java.util.Optional;\n" +
+						"import p1.B;\n" +
+						"import p1.BImpl;\n" +
+						"\n" +
+						"public class Test {\n" +
+						"    public static void main(String[] args) {\n" +
+						"        Optional<Integer> map = Optional.of(new BImpl()).map(B::amount);\n" +
+						"        System.out.print(map);\n" +
+						"    }\n" +
+						"}",
+					"p1/A.java",
+							"package p1;\n" +
+							"interface A {\n" +
+							"    default int amount() {\n" +
+							"        return 0;\n" +
+							"    }\n" +
+							"}\n",
+					"p1/B.java",
+							"package p1;\n" +
+							"public interface B extends A {}\n" +
+							"\n",
+					"p1/BImpl.java",
+							"package p1;\n" +
+							"public class BImpl implements B {}\n",
+			},
+			"Optional[0]"
+			);
+}
+public void testBug553885b() {
+	runConformTest(
+			new String[] {
+					"p2/Test.java",
+						"package p2;\n" +
+						"import java.util.Optional;\n" +
+						"import p1.B;\n" +
+						"import p1.BImpl;\n" +
+						"\n" +
+						"public class Test {\n" +
+						"    public static void main(String[] args) {\n" +
+						"        B b = new BImpl();\n" + // lead inference towards Optional<B> instead of Optional<BImpl>
+						"        Optional<Integer> map = Optional.of(b).map(B::amount);\n" +
+						"        System.out.print(map);\n" +
+						"    }\n" +
+						"}",
+					"p1/A.java",
+							"package p1;\n" +
+							"interface A {\n" +
+							"    default int amount() {\n" +
+							"        return 0;\n" +
+							"    }\n" +
+							"}\n",
+					"p1/B.java",
+							"package p1;\n" +
+							"public interface B extends A {}\n" +
+							"\n",
+					"p1/BImpl.java",
+							"package p1;\n" +
+							"public class BImpl implements B {}\n",
+			},
+			"Optional[0]"
+			);
+}
+public void testBug553885c() {
+	// classes instead of interface with default method
+	runConformTest(
+			new String[] {
+					"p2/Test.java",
+						"package p2;\n" +
+						"import java.util.Optional;\n" +
+						"import p1.B;\n" +
+						"import p1.BImpl;\n" +
+						"\n" +
+						"public class Test {\n" +
+						"    public static void main(String[] args) {\n" +
+						"        B b = new BImpl();\n" +
+						"        Optional<Integer> map = Optional.of(b).map(B::amount);\n" +
+						"        System.out.print(map);\n" +
+						"    }\n" +
+						"}",
+					"p1/A.java",
+							"package p1;\n" +
+							"class A {\n" +
+							"    public int amount() {\n" +
+							"        return 0;\n" +
+							"    }\n" +
+							"}\n",
+					"p1/B.java",
+							"package p1;\n" +
+							"public class B extends A {}\n" +
+							"\n",
+					"p1/BImpl.java",
+							"package p1;\n" +
+							"public class BImpl extends B {}\n",
+			},
+			"Optional[0]"
+			);
+}
+
 public void testBug521182() {
 	runConformTest(
 		new String[] {
diff --git a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/ProblemTypeAndMethodTest.java b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/ProblemTypeAndMethodTest.java
index 5e58441..29ee071 100644
--- a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/ProblemTypeAndMethodTest.java
+++ b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/ProblemTypeAndMethodTest.java
@@ -4821,7 +4821,9 @@
 		false,
 		false
 	);
-	this.runConformTest(
+	Runner runner = new Runner();
+	runner.javacTestOptions = JavacTestOptions.SKIP; // javac did not produce p1/p2/X.class which is needed below
+	runner.testFiles =
 		new String[] {
 			"a/b/A.java", // =================
 			"package a.b;\n" + 
@@ -4833,13 +4835,10 @@
 			"p2/p3/Z.java", // =================
 			"package p2.p3;\n" + 
 			"public class Z {}\n"
-		},
-		"",
-		null,
-		false,
-		null
-	);
-	this.runConformTest(
+		};
+	runner.shouldFlushOutputDirectory = false;
+	runner.runConformTest();
+	runner.testFiles =
 		new String[] {
 			"a/b/A.java", // =================
 			"package a.b;\n" + 
@@ -4848,12 +4847,8 @@
 			"	void test() { x.z(); }\n" + 
 			"	void foo(p2.p3.Z z) {}\n" + 
 			"}\n"
-		},
-		"",
-		null,
-		false,
-		null
-	);
+		};
+	runner.runConformTest();
 }
 //https://bugs.eclipse.org/bugs/show_bug.cgi?id=250297 - variation
 public void test093() {
@@ -8183,8 +8178,6 @@
 		"	      ^\n" + 
 		"Read access to enclosing field X.o is emulated by a synthetic accessor method\n" + 
 		"----------\n";
-	runner.javacTestOptions =
-		JavacTestOptions.Excuse.EclipseHasSomeMoreWarnings;
 	runner.runWarningTest();
 }
 
@@ -8762,6 +8755,8 @@
 		"----------\n";
 	runner.runNegativeTest();
 
+	runner.javacTestOptions = JavacTestOptions.SKIP; // javac did not produce b/Roken.class which is needed below
+
 	// restore the class as binary:
 	runner.testFiles = new String[] {
 		nameMissing,
diff --git a/org.eclipse.jdt.core.tests.model/pom.xml b/org.eclipse.jdt.core.tests.model/pom.xml
index 737fccf..f61b3ef 100644
--- a/org.eclipse.jdt.core.tests.model/pom.xml
+++ b/org.eclipse.jdt.core.tests.model/pom.xml
@@ -15,7 +15,7 @@
   <parent>
     <artifactId>tests-pom</artifactId>
     <groupId>eclipse.jdt.core</groupId>
-    <version>4.14.0-SNAPSHOT</version>
+    <version>4.15.0-SNAPSHOT</version>
     <relativePath>../tests-pom/</relativePath>
   </parent>
   <groupId>org.eclipse.jdt</groupId>
diff --git a/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/model/JavaIndexTests.java b/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/model/JavaIndexTests.java
index f29622f..ddfaa7a 100644
--- a/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/model/JavaIndexTests.java
+++ b/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/model/JavaIndexTests.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2012 IBM Corporation and others.
+ * Copyright (c) 2012, 2019 IBM Corporation and others.
  *
  * This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License 2.0
@@ -16,6 +16,9 @@
 import java.io.File;
 import java.io.IOException;
 import java.net.URL;
+import java.nio.file.Files;
+import java.nio.file.Paths;
+import java.util.zip.CRC32;
 
 import junit.framework.Test;
 
@@ -34,6 +37,7 @@
 import org.eclipse.jdt.core.index.*;
 import org.eclipse.jdt.core.search.SearchEngine;
 import org.eclipse.jdt.core.tests.util.Util;
+import org.eclipse.jdt.internal.core.ClasspathEntry;
 import org.eclipse.jdt.internal.core.JavaModelManager;
 import org.eclipse.jdt.internal.core.UserLibraryClasspathContainer;
 import org.osgi.service.prefs.BackingStoreException;
@@ -50,6 +54,7 @@
 	public static Test suite() {
 		return buildModelTestSuite(JavaIndexTests.class);
 	}
+
 	// Test that the index file is really generated.
 	public void testGenerateIndex() throws IOException {
 		String indexFilePath = getExternalResourcePath("Test.index");
@@ -866,4 +871,56 @@
 			deleteProject("ForIndex");
 		}
 	}
+
+	// Test shared index location functionality
+	public void testSharedIndexLocation() throws CoreException, IOException {
+		// Create temporary testing folder
+		String sharedIndexDir = Files.createTempDirectory("shared_index").toFile().getCanonicalPath();
+		// enable shared index
+		ClasspathEntry.setSharedIndexLocation(sharedIndexDir, getClass());
+		// path of library must be platform neutral
+		String jarFilePath = Path.fromOSString(Paths.get(sharedIndexDir, "Test.jar").toString()).toPortableString();
+		// compute index file
+		CRC32 checksumCalculator = new CRC32();
+		checksumCalculator.update(jarFilePath.getBytes());
+		String fileName = Long.toString(checksumCalculator.getValue()) + ".index";
+		String indexFilePath = Paths.get(sharedIndexDir, fileName).toString();
+		try {
+			createJar(new String[] {
+					"pkg/Test.java",
+					"package pkg;\n" +
+					"public class Test {\n" +
+					"  protected Test(int i) {}\n" +
+					"}"}, jarFilePath);
+
+			JavaIndexer.generateIndexForJar(jarFilePath, indexFilePath);
+			assertTrue(new File(indexFilePath).exists());
+			long modified = new File(indexFilePath).lastModified();
+
+			IJavaProject p = createJavaProject("P");
+			Path libPath = new Path(jarFilePath);
+			IClasspathEntry entry = JavaCore.newLibraryEntry(libPath, null, null, null, null, false);
+			setClasspath(p, new IClasspathEntry[] { entry });
+
+			waitUntilIndexesReady();
+
+			// Test that search works properly
+			search("Test", TYPE, DECLARATIONS, EXACT_RULE,
+					SearchEngine.createJavaSearchScope(new IJavaElement[] { p }));
+			assertSearchResults(Paths.get(sharedIndexDir, "Test.jar").toString() + " pkg.Test");
+
+			// Test that specified index file is really used
+			java.io.File indexFile = JavaModelManager.getIndexManager().getIndex(libPath, false, false).getIndexFile();
+			assertEquals("Specified index file is not being used", indexFilePath, indexFile.toString());
+
+			// Ensure that the index file is not modified
+			assertEquals(modified, new File(indexFilePath).lastModified());
+		} finally {
+			deleteProject("P");
+			new File(indexFilePath).delete();
+			new File(jarFilePath).delete();
+			new File(sharedIndexDir).delete();
+			ClasspathEntry.setSharedIndexLocation(null, getClass());
+		}
+	}
 }
diff --git a/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/model/ModuleBuilderTests.java b/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/model/ModuleBuilderTests.java
index 4c83d91..f94c749 100644
--- a/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/model/ModuleBuilderTests.java
+++ b/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/model/ModuleBuilderTests.java
@@ -8689,6 +8689,31 @@
 			deleteProject("lib");
 		}
 	}
+
+	public void testBug558004() throws CoreException {
+		IJavaProject prj = createJava9Project("A");
+		try {
+			String moduleinfopath = "A/src/module-info.java";
+			String moduleinfosrc =
+				"/**\n" +
+				" * The {@link java.nio.file.FileSystems#newFileSystem FileSystems.newFileSystem(URI.create(\"jrt:/\"))}\n" +
+				" */\n" +
+				"module modulartest11 {\n" +
+				"}\n";
+			createFile(moduleinfopath, moduleinfosrc);
+			getWorkspace().build(IncrementalProjectBuilder.FULL_BUILD, null);
+			assertNoErrors();
+			this.problemRequestor.initialize(moduleinfosrc.toCharArray());
+			getCompilationUnit("A/src/module-info.java").getWorkingCopy(this.wcOwner, null);
+			assertProblems("unexpected problems",
+					"----------\n" +
+					"----------\n",
+					this.problemRequestor);
+		} finally {
+			deleteProject(prj);
+		}
+	}
+
 	public void testBug547479() throws CoreException {
 		int max = org.eclipse.jdt.internal.core.builder.AbstractImageBuilder.MAX_AT_ONCE;
 
diff --git a/org.eclipse.jdt.core.tests.performance/pom.xml b/org.eclipse.jdt.core.tests.performance/pom.xml
index 1aa7656..c7fcb3d 100644
--- a/org.eclipse.jdt.core.tests.performance/pom.xml
+++ b/org.eclipse.jdt.core.tests.performance/pom.xml
@@ -15,7 +15,7 @@
   <parent>
     <artifactId>tests-pom</artifactId>
     <groupId>eclipse.jdt.core</groupId>
-    <version>4.14.0-SNAPSHOT</version>
+    <version>4.15.0-SNAPSHOT</version>
     <relativePath>../tests-pom/</relativePath>
   </parent>
   <groupId>org.eclipse.jdt</groupId>
diff --git a/org.eclipse.jdt.core/.settings/.api_filters b/org.eclipse.jdt.core/.settings/.api_filters
index af7f1cc..6a208a7 100644
--- a/org.eclipse.jdt.core/.settings/.api_filters
+++ b/org.eclipse.jdt.core/.settings/.api_filters
@@ -1,5 +1,13 @@
 <?xml version="1.0" encoding="UTF-8" standalone="no"?>
 <component id="org.eclipse.jdt.core" version="2">
+    <resource path="META-INF/MANIFEST.MF">
+        <filter comment="Needed for Java14" id="924844039">
+            <message_arguments>
+                <message_argument value="3.20.100"/>
+                <message_argument value="3.20.0"/>
+            </message_arguments>
+        </filter>
+    </resource>
     <resource path="compiler/org/eclipse/jdt/core/compiler/CategorizedProblem.java" type="org.eclipse.jdt.core.compiler.CategorizedProblem">
         <filter comment="PREVIEW RELATED" id="336658481">
             <message_arguments>
@@ -16,6 +24,139 @@
                 <message_argument value="4194303"/>
             </message_arguments>
         </filter>
+        <filter comment="Needed for Java14" id="388194388">
+            <message_arguments>
+                <message_argument value="org.eclipse.jdt.core.compiler.IProblem"/>
+                <message_argument value="SwitchExpressionaYieldSwitchLabeledBlockCompletesNormally"/>
+                <message_argument value="2098855"/>
+            </message_arguments>
+        </filter>
+        <filter comment="Needed for Java14" id="388194388">
+            <message_arguments>
+                <message_argument value="org.eclipse.jdt.core.compiler.IProblem"/>
+                <message_argument value="SwitchExpressionsYieldBreakNotAllowed"/>
+                <message_argument value="2098863"/>
+            </message_arguments>
+        </filter>
+        <filter comment="Needed for Java14" id="388194388">
+            <message_arguments>
+                <message_argument value="org.eclipse.jdt.core.compiler.IProblem"/>
+                <message_argument value="SwitchExpressionsYieldEmptySwitchBlock"/>
+                <message_argument value="2098853"/>
+            </message_arguments>
+        </filter>
+        <filter comment="Needed for Java14" id="388194388">
+            <message_arguments>
+                <message_argument value="org.eclipse.jdt.core.compiler.IProblem"/>
+                <message_argument value="SwitchExpressionsYieldIllegalLastStatement"/>
+                <message_argument value="2098862"/>
+            </message_arguments>
+        </filter>
+        <filter comment="Needed for Java14" id="388194388">
+            <message_arguments>
+                <message_argument value="org.eclipse.jdt.core.compiler.IProblem"/>
+                <message_argument value="SwitchExpressionsYieldIllegalStatement"/>
+                <message_argument value="2098868"/>
+            </message_arguments>
+        </filter>
+        <filter comment="Needed for Java14" id="388194388">
+            <message_arguments>
+                <message_argument value="org.eclipse.jdt.core.compiler.IProblem"/>
+                <message_argument value="SwitchExpressionsYieldIncompatibleResultExpressionTypes"/>
+                <message_argument value="2098852"/>
+            </message_arguments>
+        </filter>
+        <filter comment="Needed for Java14" id="388194388">
+            <message_arguments>
+                <message_argument value="org.eclipse.jdt.core.compiler.IProblem"/>
+                <message_argument value="SwitchExpressionsYieldLastStatementCompletesNormally"/>
+                <message_argument value="2098856"/>
+            </message_arguments>
+        </filter>
+        <filter comment="Needed for Java14" id="388194388">
+            <message_arguments>
+                <message_argument value="org.eclipse.jdt.core.compiler.IProblem"/>
+                <message_argument value="SwitchExpressionsYieldMissingDefaultCase"/>
+                <message_argument value="2098859"/>
+            </message_arguments>
+        </filter>
+        <filter comment="Needed for Java14" id="388194388">
+            <message_arguments>
+                <message_argument value="org.eclipse.jdt.core.compiler.IProblem"/>
+                <message_argument value="SwitchExpressionsYieldMissingEnumConstantCase"/>
+                <message_argument value="2098861"/>
+            </message_arguments>
+        </filter>
+        <filter comment="Needed for Java14" id="388194388">
+            <message_arguments>
+                <message_argument value="org.eclipse.jdt.core.compiler.IProblem"/>
+                <message_argument value="SwitchExpressionsYieldMissingValue"/>
+                <message_argument value="2098860"/>
+            </message_arguments>
+        </filter>
+        <filter comment="Needed for Java14" id="388194388">
+            <message_arguments>
+                <message_argument value="org.eclipse.jdt.core.compiler.IProblem"/>
+                <message_argument value="SwitchExpressionsYieldNoResultExpression"/>
+                <message_argument value="2098854"/>
+            </message_arguments>
+        </filter>
+        <filter comment="Needed for Java14" id="388194388">
+            <message_arguments>
+                <message_argument value="org.eclipse.jdt.core.compiler.IProblem"/>
+                <message_argument value="SwitchExpressionsYieldOutsideSwitchExpression"/>
+                <message_argument value="2098866"/>
+            </message_arguments>
+        </filter>
+        <filter comment="Needed for Java14" id="388194388">
+            <message_arguments>
+                <message_argument value="org.eclipse.jdt.core.compiler.IProblem"/>
+                <message_argument value="SwitchExpressionsYieldRestrictedGeneralWarning"/>
+                <message_argument value="2098867"/>
+            </message_arguments>
+        </filter>
+        <filter comment="Needed for Java14" id="388194388">
+            <message_arguments>
+                <message_argument value="org.eclipse.jdt.core.compiler.IProblem"/>
+                <message_argument value="SwitchExpressionsYieldTrailingSwitchLabels"/>
+                <message_argument value="2098857"/>
+            </message_arguments>
+        </filter>
+        <filter comment="Needed for Java14" id="388194388">
+            <message_arguments>
+                <message_argument value="org.eclipse.jdt.core.compiler.IProblem"/>
+                <message_argument value="SwitchExpressionsYieldTypeDeclarationError"/>
+                <message_argument value="2098870"/>
+            </message_arguments>
+        </filter>
+        <filter comment="Needed for Java14" id="388194388">
+            <message_arguments>
+                <message_argument value="org.eclipse.jdt.core.compiler.IProblem"/>
+                <message_argument value="SwitchExpressionsYieldTypeDeclarationWarning"/>
+                <message_argument value="2098869"/>
+            </message_arguments>
+        </filter>
+        <filter comment="Needed for Java14" id="388194388">
+            <message_arguments>
+                <message_argument value="org.eclipse.jdt.core.compiler.IProblem"/>
+                <message_argument value="SwitchExpressionsYieldUnqualifiedMethodError"/>
+                <message_argument value="2098865"/>
+            </message_arguments>
+        </filter>
+        <filter comment="Needed for Java14" id="388194388">
+            <message_arguments>
+                <message_argument value="org.eclipse.jdt.core.compiler.IProblem"/>
+                <message_argument value="SwitchExpressionsYieldUnqualifiedMethodWarning"/>
+                <message_argument value="2098864"/>
+            </message_arguments>
+        </filter>
+        <filter comment="Needed for Java14" id="388194388">
+            <message_arguments>
+                <message_argument value="org.eclipse.jdt.core.compiler.IProblem"/>
+                <message_argument value="SwitchPreviewMixedCase"/>
+                <message_argument value="2098858"/>
+            </message_arguments>
+        </filter>
     </resource>
     <resource path="dom/org/eclipse/jdt/core/dom/ASTVisitor.java" type="org.eclipse.jdt.core.dom.ASTVisitor">
         <filter comment="Not required as it is a part of preview feature" id="338944126">
@@ -51,6 +192,14 @@
             </message_arguments>
         </filter>
     </resource>
+    <resource path="dom/org/eclipse/jdt/core/dom/MethodDeclaration.java" type="org.eclipse.jdt.core.dom.MethodDeclaration">
+        <filter comment="Needed for Java 14" id="336658481">
+            <message_arguments>
+                <message_argument value="org.eclipse.jdt.core.dom.MethodDeclaration"/>
+                <message_argument value="COMPACT_CONSTRUCTOR_PROPERTY"/>
+            </message_arguments>
+        </filter>
+    </resource>
     <resource path="dom/org/eclipse/jdt/core/dom/SwitchCase.java" type="org.eclipse.jdt.core.dom.SwitchCase">
         <filter comment="No more an API as part of preview feature" id="338944126">
             <message_arguments>
diff --git a/org.eclipse.jdt.core/.settings/org.eclipse.pde.api.tools.prefs b/org.eclipse.jdt.core/.settings/org.eclipse.pde.api.tools.prefs
index 2ec8851..6f7536a 100644
--- a/org.eclipse.jdt.core/.settings/org.eclipse.pde.api.tools.prefs
+++ b/org.eclipse.jdt.core/.settings/org.eclipse.pde.api.tools.prefs
@@ -1,104 +1,94 @@
-ANNOTATION_ELEMENT_TYPE_ADDED_FIELD=Ignore
-ANNOTATION_ELEMENT_TYPE_ADDED_METHOD_WITHOUT_DEFAULT_VALUE=Ignore
-ANNOTATION_ELEMENT_TYPE_CHANGED_TYPE_CONVERSION=Ignore
-ANNOTATION_ELEMENT_TYPE_REMOVED_FIELD=Ignore
-ANNOTATION_ELEMENT_TYPE_REMOVED_METHOD=Ignore
-ANNOTATION_ELEMENT_TYPE_REMOVED_TYPE_MEMBER=Ignore
-API_COMPONENT_ELEMENT_TYPE_REMOVED_API_TYPE=Ignore
-API_COMPONENT_ELEMENT_TYPE_REMOVED_REEXPORTED_API_TYPE=Ignore
-API_COMPONENT_ELEMENT_TYPE_REMOVED_REEXPORTED_TYPE=Ignore
-API_COMPONENT_ELEMENT_TYPE_REMOVED_TYPE=Ignore
-API_USE_SCAN_FIELD_SEVERITY=Ignore
-API_USE_SCAN_METHOD_SEVERITY=Ignore
-API_USE_SCAN_TYPE_SEVERITY=Ignore
-CLASS_ELEMENT_TYPE_ADDED_FIELD=Ignore
-CLASS_ELEMENT_TYPE_ADDED_METHOD=Ignore
-CLASS_ELEMENT_TYPE_ADDED_RESTRICTIONS=Ignore
-CLASS_ELEMENT_TYPE_ADDED_TYPE_PARAMETER=Ignore
-CLASS_ELEMENT_TYPE_CHANGED_CONTRACTED_SUPERINTERFACES_SET=Ignore
-CLASS_ELEMENT_TYPE_CHANGED_DECREASE_ACCESS=Ignore
-CLASS_ELEMENT_TYPE_CHANGED_NON_ABSTRACT_TO_ABSTRACT=Ignore
-CLASS_ELEMENT_TYPE_CHANGED_NON_FINAL_TO_FINAL=Ignore
-CLASS_ELEMENT_TYPE_CHANGED_TYPE_CONVERSION=Ignore
-CLASS_ELEMENT_TYPE_REMOVED_CONSTRUCTOR=Ignore
-CLASS_ELEMENT_TYPE_REMOVED_FIELD=Ignore
-CLASS_ELEMENT_TYPE_REMOVED_METHOD=Ignore
-CLASS_ELEMENT_TYPE_REMOVED_SUPERCLASS=Ignore
-CLASS_ELEMENT_TYPE_REMOVED_TYPE_MEMBER=Ignore
-CLASS_ELEMENT_TYPE_REMOVED_TYPE_PARAMETER=Ignore
-CONSTRUCTOR_ELEMENT_TYPE_ADDED_TYPE_PARAMETER=Ignore
-CONSTRUCTOR_ELEMENT_TYPE_CHANGED_DECREASE_ACCESS=Ignore
-CONSTRUCTOR_ELEMENT_TYPE_CHANGED_VARARGS_TO_ARRAY=Ignore
-CONSTRUCTOR_ELEMENT_TYPE_REMOVED_TYPE_PARAMETER=Ignore
-ENUM_ELEMENT_TYPE_CHANGED_CONTRACTED_SUPERINTERFACES_SET=Ignore
-ENUM_ELEMENT_TYPE_CHANGED_TYPE_CONVERSION=Ignore
-ENUM_ELEMENT_TYPE_REMOVED_ENUM_CONSTANT=Ignore
-ENUM_ELEMENT_TYPE_REMOVED_FIELD=Ignore
-ENUM_ELEMENT_TYPE_REMOVED_METHOD=Ignore
-ENUM_ELEMENT_TYPE_REMOVED_TYPE_MEMBER=Ignore
-FIELD_ELEMENT_TYPE_ADDED_VALUE=Ignore
-FIELD_ELEMENT_TYPE_CHANGED_DECREASE_ACCESS=Ignore
-FIELD_ELEMENT_TYPE_CHANGED_FINAL_TO_NON_FINAL_STATIC_CONSTANT=Ignore
-FIELD_ELEMENT_TYPE_CHANGED_NON_FINAL_TO_FINAL=Ignore
-FIELD_ELEMENT_TYPE_CHANGED_NON_STATIC_TO_STATIC=Ignore
-FIELD_ELEMENT_TYPE_CHANGED_STATIC_TO_NON_STATIC=Ignore
-FIELD_ELEMENT_TYPE_CHANGED_TYPE=Ignore
-FIELD_ELEMENT_TYPE_CHANGED_VALUE=Ignore
-FIELD_ELEMENT_TYPE_REMOVED_TYPE_ARGUMENT=Ignore
-FIELD_ELEMENT_TYPE_REMOVED_VALUE=Ignore
-ILLEGAL_EXTEND=Ignore
-ILLEGAL_IMPLEMENT=Ignore
-ILLEGAL_INSTANTIATE=Ignore
-ILLEGAL_OVERRIDE=Ignore
-ILLEGAL_REFERENCE=Ignore
-INTERFACE_ELEMENT_TYPE_ADDED_DEFAULT_METHOD=Ignore
-INTERFACE_ELEMENT_TYPE_ADDED_FIELD=Ignore
-INTERFACE_ELEMENT_TYPE_ADDED_METHOD=Ignore
-INTERFACE_ELEMENT_TYPE_ADDED_RESTRICTIONS=Ignore
-INTERFACE_ELEMENT_TYPE_ADDED_SUPER_INTERFACE_WITH_METHODS=Ignore
-INTERFACE_ELEMENT_TYPE_ADDED_TYPE_PARAMETER=Ignore
-INTERFACE_ELEMENT_TYPE_CHANGED_CONTRACTED_SUPERINTERFACES_SET=Ignore
-INTERFACE_ELEMENT_TYPE_CHANGED_TYPE_CONVERSION=Ignore
-INTERFACE_ELEMENT_TYPE_REMOVED_FIELD=Ignore
-INTERFACE_ELEMENT_TYPE_REMOVED_METHOD=Ignore
-INTERFACE_ELEMENT_TYPE_REMOVED_TYPE_MEMBER=Ignore
-INTERFACE_ELEMENT_TYPE_REMOVED_TYPE_PARAMETER=Ignore
-INVALID_ANNOTATION=Ignore
-INVALID_JAVADOC_TAG=Ignore
-INVALID_REFERENCE_IN_SYSTEM_LIBRARIES=Ignore
-LEAK_EXTEND=Ignore
-LEAK_FIELD_DECL=Ignore
-LEAK_IMPLEMENT=Ignore
-LEAK_METHOD_PARAM=Ignore
-LEAK_METHOD_RETURN_TYPE=Ignore
-METHOD_ELEMENT_TYPE_ADDED_RESTRICTIONS=Ignore
-METHOD_ELEMENT_TYPE_ADDED_TYPE_PARAMETER=Ignore
-METHOD_ELEMENT_TYPE_CHANGED_DECREASE_ACCESS=Ignore
-METHOD_ELEMENT_TYPE_CHANGED_NON_ABSTRACT_TO_ABSTRACT=Ignore
-METHOD_ELEMENT_TYPE_CHANGED_NON_FINAL_TO_FINAL=Ignore
-METHOD_ELEMENT_TYPE_CHANGED_NON_STATIC_TO_STATIC=Ignore
-METHOD_ELEMENT_TYPE_CHANGED_STATIC_TO_NON_STATIC=Ignore
-METHOD_ELEMENT_TYPE_CHANGED_VARARGS_TO_ARRAY=Ignore
-METHOD_ELEMENT_TYPE_REMOVED_ANNOTATION_DEFAULT_VALUE=Ignore
-METHOD_ELEMENT_TYPE_REMOVED_TYPE_PARAMETER=Ignore
-MISSING_EE_DESCRIPTIONS=Ignore
-TYPE_PARAMETER_ELEMENT_TYPE_ADDED_CLASS_BOUND=Ignore
-TYPE_PARAMETER_ELEMENT_TYPE_ADDED_INTERFACE_BOUND=Ignore
-TYPE_PARAMETER_ELEMENT_TYPE_CHANGED_CLASS_BOUND=Ignore
-TYPE_PARAMETER_ELEMENT_TYPE_CHANGED_INTERFACE_BOUND=Ignore
-TYPE_PARAMETER_ELEMENT_TYPE_REMOVED_CLASS_BOUND=Ignore
-TYPE_PARAMETER_ELEMENT_TYPE_REMOVED_INTERFACE_BOUND=Ignore
-UNUSED_PROBLEM_FILTERS=Ignore
-automatically_removed_unused_problem_filters=Ignore
-changed_execution_env=Ignore
+#Fri May 21 10:24:07 EDT 2010
+ANNOTATION_ELEMENT_TYPE_ADDED_METHOD_WITHOUT_DEFAULT_VALUE=Error
+ANNOTATION_ELEMENT_TYPE_CHANGED_TYPE_CONVERSION=Error
+ANNOTATION_ELEMENT_TYPE_REMOVED_FIELD=Error
+ANNOTATION_ELEMENT_TYPE_REMOVED_METHOD=Error
+ANNOTATION_ELEMENT_TYPE_REMOVED_TYPE_MEMBER=Error
+API_COMPONENT_ELEMENT_TYPE_REMOVED_API_TYPE=Error
+API_COMPONENT_ELEMENT_TYPE_REMOVED_REEXPORTED_API_TYPE=Error
+API_COMPONENT_ELEMENT_TYPE_REMOVED_REEXPORTED_TYPE=Error
+API_COMPONENT_ELEMENT_TYPE_REMOVED_TYPE=Error
+CLASS_ELEMENT_TYPE_ADDED_METHOD=Error
+CLASS_ELEMENT_TYPE_ADDED_RESTRICTIONS=Error
+CLASS_ELEMENT_TYPE_ADDED_TYPE_PARAMETER=Error
+CLASS_ELEMENT_TYPE_CHANGED_CONTRACTED_SUPERINTERFACES_SET=Error
+CLASS_ELEMENT_TYPE_CHANGED_DECREASE_ACCESS=Error
+CLASS_ELEMENT_TYPE_CHANGED_NON_ABSTRACT_TO_ABSTRACT=Error
+CLASS_ELEMENT_TYPE_CHANGED_NON_FINAL_TO_FINAL=Error
+CLASS_ELEMENT_TYPE_CHANGED_TYPE_CONVERSION=Error
+CLASS_ELEMENT_TYPE_REMOVED_CONSTRUCTOR=Error
+CLASS_ELEMENT_TYPE_REMOVED_FIELD=Error
+CLASS_ELEMENT_TYPE_REMOVED_METHOD=Error
+CLASS_ELEMENT_TYPE_REMOVED_SUPERCLASS=Error
+CLASS_ELEMENT_TYPE_REMOVED_TYPE_MEMBER=Error
+CLASS_ELEMENT_TYPE_REMOVED_TYPE_PARAMETER=Error
+CONSTRUCTOR_ELEMENT_TYPE_ADDED_TYPE_PARAMETER=Error
+CONSTRUCTOR_ELEMENT_TYPE_CHANGED_DECREASE_ACCESS=Error
+CONSTRUCTOR_ELEMENT_TYPE_CHANGED_VARARGS_TO_ARRAY=Error
+CONSTRUCTOR_ELEMENT_TYPE_REMOVED_TYPE_PARAMETER=Error
+ENUM_ELEMENT_TYPE_CHANGED_CONTRACTED_SUPERINTERFACES_SET=Error
+ENUM_ELEMENT_TYPE_CHANGED_TYPE_CONVERSION=Error
+ENUM_ELEMENT_TYPE_REMOVED_ENUM_CONSTANT=Error
+ENUM_ELEMENT_TYPE_REMOVED_FIELD=Error
+ENUM_ELEMENT_TYPE_REMOVED_METHOD=Error
+ENUM_ELEMENT_TYPE_REMOVED_TYPE_MEMBER=Error
+FIELD_ELEMENT_TYPE_ADDED_VALUE=Error
+FIELD_ELEMENT_TYPE_CHANGED_DECREASE_ACCESS=Error
+FIELD_ELEMENT_TYPE_CHANGED_FINAL_TO_NON_FINAL_STATIC_CONSTANT=Error
+FIELD_ELEMENT_TYPE_CHANGED_NON_FINAL_TO_FINAL=Error
+FIELD_ELEMENT_TYPE_CHANGED_NON_STATIC_TO_STATIC=Error
+FIELD_ELEMENT_TYPE_CHANGED_STATIC_TO_NON_STATIC=Error
+FIELD_ELEMENT_TYPE_CHANGED_TYPE=Error
+FIELD_ELEMENT_TYPE_CHANGED_VALUE=Error
+FIELD_ELEMENT_TYPE_REMOVED_TYPE_ARGUMENT=Error
+FIELD_ELEMENT_TYPE_REMOVED_VALUE=Error
+ILLEGAL_EXTEND=Warning
+ILLEGAL_IMPLEMENT=Warning
+ILLEGAL_INSTANTIATE=Warning
+ILLEGAL_OVERRIDE=Warning
+ILLEGAL_REFERENCE=Warning
+INTERFACE_ELEMENT_TYPE_ADDED_FIELD=Error
+INTERFACE_ELEMENT_TYPE_ADDED_METHOD=Error
+INTERFACE_ELEMENT_TYPE_ADDED_RESTRICTIONS=Error
+INTERFACE_ELEMENT_TYPE_ADDED_SUPER_INTERFACE_WITH_METHODS=Error
+INTERFACE_ELEMENT_TYPE_ADDED_TYPE_PARAMETER=Error
+INTERFACE_ELEMENT_TYPE_CHANGED_CONTRACTED_SUPERINTERFACES_SET=Error
+INTERFACE_ELEMENT_TYPE_CHANGED_TYPE_CONVERSION=Error
+INTERFACE_ELEMENT_TYPE_REMOVED_FIELD=Error
+INTERFACE_ELEMENT_TYPE_REMOVED_METHOD=Error
+INTERFACE_ELEMENT_TYPE_REMOVED_TYPE_MEMBER=Error
+INTERFACE_ELEMENT_TYPE_REMOVED_TYPE_PARAMETER=Error
+INVALID_JAVADOC_TAG=Warning
+INVALID_REFERENCE_IN_SYSTEM_LIBRARIES=Warning
+LEAK_EXTEND=Warning
+LEAK_FIELD_DECL=Warning
+LEAK_IMPLEMENT=Warning
+LEAK_METHOD_PARAM=Warning
+LEAK_METHOD_RETURN_TYPE=Warning
+METHOD_ELEMENT_TYPE_ADDED_RESTRICTIONS=Error
+METHOD_ELEMENT_TYPE_ADDED_TYPE_PARAMETER=Error
+METHOD_ELEMENT_TYPE_CHANGED_DECREASE_ACCESS=Error
+METHOD_ELEMENT_TYPE_CHANGED_NON_ABSTRACT_TO_ABSTRACT=Error
+METHOD_ELEMENT_TYPE_CHANGED_NON_FINAL_TO_FINAL=Error
+METHOD_ELEMENT_TYPE_CHANGED_NON_STATIC_TO_STATIC=Error
+METHOD_ELEMENT_TYPE_CHANGED_STATIC_TO_NON_STATIC=Error
+METHOD_ELEMENT_TYPE_CHANGED_VARARGS_TO_ARRAY=Error
+METHOD_ELEMENT_TYPE_REMOVED_ANNOTATION_DEFAULT_VALUE=Error
+METHOD_ELEMENT_TYPE_REMOVED_TYPE_PARAMETER=Error
+TYPE_PARAMETER_ELEMENT_TYPE_ADDED_CLASS_BOUND=Error
+TYPE_PARAMETER_ELEMENT_TYPE_ADDED_INTERFACE_BOUND=Error
+TYPE_PARAMETER_ELEMENT_TYPE_CHANGED_CLASS_BOUND=Error
+TYPE_PARAMETER_ELEMENT_TYPE_CHANGED_INTERFACE_BOUND=Error
+TYPE_PARAMETER_ELEMENT_TYPE_REMOVED_CLASS_BOUND=Error
+TYPE_PARAMETER_ELEMENT_TYPE_REMOVED_INTERFACE_BOUND=Error
+UNUSED_PROBLEM_FILTERS=Warning
+automatically_removed_unused_problem_filters=false
 eclipse.preferences.version=1
-incompatible_api_component_version=Ignore
+incompatible_api_component_version=Error
 incompatible_api_component_version_include_major_without_breaking_change=Disabled
 incompatible_api_component_version_include_minor_without_api_change=Disabled
-incompatible_api_component_version_report_major_without_breaking_change=Ignore
-incompatible_api_component_version_report_minor_without_api_change=Ignore
-invalid_since_tag_version=Ignore
-malformed_since_tag=Ignore
-missing_since_tag=Ignore
+invalid_since_tag_version=Error
+malformed_since_tag=Error
+missing_since_tag=Error
 report_api_breakage_when_major_version_incremented=Disabled
-report_resolution_errors_api_component=Ignore
+report_resolution_errors_api_component=Warning
diff --git a/org.eclipse.jdt.core/META-INF/MANIFEST.MF b/org.eclipse.jdt.core/META-INF/MANIFEST.MF
index c3a0b03..594a60d 100644
--- a/org.eclipse.jdt.core/META-INF/MANIFEST.MF
+++ b/org.eclipse.jdt.core/META-INF/MANIFEST.MF
@@ -3,7 +3,7 @@
 Bundle-ManifestVersion: 2
 Bundle-Name: %pluginName
 Bundle-SymbolicName: org.eclipse.jdt.core; singleton:=true
-Bundle-Version: 3.20.0.qualifier
+Bundle-Version: 3.20.100.qualifier
 Bundle-Activator: org.eclipse.jdt.core.JavaCore
 Bundle-Vendor: %providerName
 Bundle-Localization: plugin
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ClassFile.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ClassFile.java
index 578d000..9835a46 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ClassFile.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ClassFile.java
@@ -5960,24 +5960,33 @@
 
 	private TypeBinding getNewTypeBinding(char[] typeConstantPoolName, Scope scope) {
 		char[] typeName = typeConstantPoolName;
+		if (isLikelyLocalTypeName(typeName)) {
+			// find local type in innerClassesBindings:
+			Set<TypeBinding> innerTypeBindings = this.innerClassesBindings.keySet();
+			for (TypeBinding binding : innerTypeBindings) {
+				if (CharOperation.equals(binding.constantPoolName(), typeName))
+					return binding;
+			}
+		}
 		TypeBinding type = (TypeBinding) scope.getTypeOrPackage(CharOperation.splitOn('/', typeName));
 		if (!type.isValidBinding()) {
 			ProblemReferenceBinding problemReferenceBinding = (ProblemReferenceBinding) type;
 			if ((problemReferenceBinding.problemId() & ProblemReasons.InternalNameProvided) != 0) {
 				type = problemReferenceBinding.closestMatch();
-			} else if ((problemReferenceBinding.problemId() & ProblemReasons.NotFound) != 0 && this.innerClassesBindings != null) {
-				// check local inner types to see if this is a anonymous type
-				Set<TypeBinding> innerTypeBindings = this.innerClassesBindings.keySet();
-				for (TypeBinding binding : innerTypeBindings) {
-					if (CharOperation.equals(binding.constantPoolName(), typeName)) {
-						type = binding;
-						break;
-					}
-				}
 			}
 		}
 		return type;
 	}
+	
+	private boolean isLikelyLocalTypeName(char[] typeName) {
+		int dollarPos = CharOperation.lastIndexOf('$', typeName);
+		while (dollarPos != -1) {
+			if (Character.isDigit(typeName[dollarPos+1]))
+				return true; // name segment starts with a digit => likely a local type (but still "$0" etc. could be part of the source name)
+			dollarPos = CharOperation.lastIndexOf('$', typeName, 0, dollarPos-1);
+		}
+		return false;
+	}
 
 	private TypeBinding getANewArrayTypeBinding(char[] typeConstantPoolName, Scope scope) {
 		if (typeConstantPoolName[0] == '[') {
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/Javadoc.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/Javadoc.java
index 087d33f..c00df74 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/Javadoc.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/Javadoc.java
@@ -423,7 +423,8 @@
 					scope.problemReporter().javadocInvalidValueReference(fieldRef.sourceStart, fieldRef.sourceEnd, scopeModifiers);
 				}
 				else if (fieldRef.actualReceiverType != null) {
-					if (scope.enclosingSourceType().isCompatibleWith(fieldRef.actualReceiverType)) {
+					SourceTypeBinding stb = scope.enclosingSourceType();
+					if (stb != null && stb.isCompatibleWith(fieldRef.actualReceiverType)) {
 						fieldRef.bits |= ASTNode.SuperAccess;
 					}
 					ReferenceBinding resolvedType = (ReferenceBinding) fieldRef.actualReceiverType;
@@ -964,8 +965,9 @@
 
 				ClassScope topLevelScope = scope.classScope();
 				// when scope is not on compilation unit type, then inner class may not be visible...
-				if (topLevelScope.parent.kind != Scope.COMPILATION_UNIT_SCOPE ||
-					!CharOperation.equals(topLevelType.sourceName, topLevelScope.referenceContext.name)) {
+				if (topLevelScope != null &&
+					(topLevelScope.parent.kind != Scope.COMPILATION_UNIT_SCOPE ||
+					!CharOperation.equals(topLevelType.sourceName, topLevelScope.referenceContext.name))) {
 					topLevelScope = topLevelScope.outerMostClassScope();
 					if (typeReference instanceof JavadocSingleTypeReference) {
 						// inner class single reference can only be done in same unit
@@ -1014,7 +1016,7 @@
 					// partially qualified references from a different CU should be warned
 					char[][] typeRefName = ((JavadocQualifiedTypeReference) typeReference).getTypeName();
 					int skipLength = 0;
-					if (topLevelScope.getCurrentPackage() == resolvedType.getPackage()
+					if (topLevelScope != null && topLevelScope.getCurrentPackage() == resolvedType.getPackage()
 							&& typeRefName.length < computedCompoundName.length) {
 						// https://bugs.eclipse.org/bugs/show_bug.cgi?id=221539: references can be partially qualified
 						// in same package and hence if the package name is not given, ignore package name check
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/ReferenceExpression.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/ReferenceExpression.java
index cfa3925..dc687c5 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/ReferenceExpression.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/ReferenceExpression.java
@@ -287,9 +287,11 @@
 				if (TypeBinding.notEquals(this.binding.declaringClass, this.lhs.resolvedType.erasure())) {
 					// reference to a method declared by an inaccessible type accessed via a
 					// subtype - normally a bridge method would be present to facilitate
-					// this access, unless the method is final/static, in which case, direct access to
+					// this access, unless the method is final/static/default, in which case, direct access to
 					// the method is not possible, an implicit lambda is needed
 					if (!this.binding.declaringClass.canBeSeenBy(this.enclosingScope)) {
+						if (this.binding.isDefaultMethod())
+							return false; // workaround for bug in MethodHandle lookup, see https://bugs.openjdk.java.net/browse/JDK-8068253
 						return !(this.binding.isFinal() || this.binding.isStatic());
 					}
 				}
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/Scope.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/Scope.java
index b129397..0742835 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/Scope.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/Scope.java
@@ -2530,6 +2530,10 @@
 				MethodScope methodScope = methodScope();
 				if (!methodScope.isInsideInitializer()){
 					// check method modifiers to see if deprecated
+					ReferenceContext ref = methodScope.referenceContext();
+					if (ref instanceof ModuleDeclaration) {
+						return ((ModuleDeclaration)ref).modifiers;
+					}
 					MethodBinding context = ((AbstractMethodDeclaration)methodScope.referenceContext).binding;
 					if (context != null)
 						return context.modifiers;
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/parser/AbstractCommentParser.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/parser/AbstractCommentParser.java
index 9b90a4f..24a2b35 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/parser/AbstractCommentParser.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/parser/AbstractCommentParser.java
@@ -465,7 +465,6 @@
 			}
 			updateDocComment();
 		} catch (Exception ex) {
-			ex.printStackTrace();
 			validComment = false;
 		}
 		return validComment;
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/parser/JavadocParser.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/parser/JavadocParser.java
index 0fe67da..8e845d4 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/parser/JavadocParser.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/parser/JavadocParser.java
@@ -1068,7 +1068,6 @@
 	}
 
 	protected boolean pushUsesReference(Object typeRef) {
-		// TODO Auto-generated method stub
 		if (this.usesReferencesPtr == -1l) {
 			this.usesReferencesStack = new TypeReference[10];
 		}
@@ -1104,7 +1103,6 @@
 	}
 
 	protected boolean pushProvidesReference(Object typeRef) {
-		// TODO Auto-generated method stub
 		if (this.providesReferencesPtr == -1l) {
 			this.providesReferencesStack = new TypeReference[10];
 		}
diff --git a/org.eclipse.jdt.core/formatter/org/eclipse/jdt/core/formatter/DefaultCodeFormatterConstants.java b/org.eclipse.jdt.core/formatter/org/eclipse/jdt/core/formatter/DefaultCodeFormatterConstants.java
index a7dbea6..37a4772 100644
--- a/org.eclipse.jdt.core/formatter/org/eclipse/jdt/core/formatter/DefaultCodeFormatterConstants.java
+++ b/org.eclipse.jdt.core/formatter/org/eclipse/jdt/core/formatter/DefaultCodeFormatterConstants.java
@@ -1914,7 +1914,7 @@
 	 * @see #INDENT_BY_ONE
 	 * @see #INDENT_DEFAULT
 	 * @see #INDENT_ON_COLUMN
-	 * @since 3.19
+	 * @since 3.20
 	 */
 	public static final String FORMATTER_TEXT_BLOCK_INDENTATION = JavaCore.PLUGIN_ID + ".formatter.text_block_indentation"; //$NON-NLS-1$
 
@@ -5103,7 +5103,7 @@
 	 * <pre>
 	 * FORMATTER / Indentation is not touched, it's preserved from original source.
 	 * </pre>
-	 * @since 3.19
+	 * @since 3.20
 	 */
 	public static final int INDENT_PRESERVE = 3;
 
diff --git a/org.eclipse.jdt.core/model/org/eclipse/jdt/core/ToolFactory.java b/org.eclipse.jdt.core/model/org/eclipse/jdt/core/ToolFactory.java
index 9479cd8..2ed3678 100644
--- a/org.eclipse.jdt.core/model/org/eclipse/jdt/core/ToolFactory.java
+++ b/org.eclipse.jdt.core/model/org/eclipse/jdt/core/ToolFactory.java
@@ -582,7 +582,7 @@
 	 * @return a scanner
 	 * @see org.eclipse.jdt.core.compiler.IScanner
 	 *
-	 * @since 3.14
+	 * @since 3.20
 	 */
 	@SuppressWarnings("javadoc") // references deprecated TokenNameIdentifier
 	public static IScanner createScanner(boolean tokenizeComments, boolean tokenizeWhiteSpace, boolean recordLineSeparator, String sourceLevel, String complianceLevel, boolean enablePreview) {
diff --git a/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/ClasspathEntry.java b/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/ClasspathEntry.java
index dc3de37..374d128 100644
--- a/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/ClasspathEntry.java
+++ b/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/ClasspathEntry.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2018 IBM Corporation and others.
+ * Copyright (c) 2000, 2019 IBM Corporation and others.
  *
  * This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License 2.0
@@ -31,6 +31,7 @@
 import java.io.UnsupportedEncodingException;
 import java.net.MalformedURLException;
 import java.net.URL;
+import java.nio.file.Paths;
 import java.util.ArrayList;
 import java.util.Arrays;
 import java.util.HashMap;
@@ -38,6 +39,7 @@
 import java.util.Iterator;
 import java.util.List;
 import java.util.Map;
+import java.util.zip.CRC32;
 import java.util.zip.ZipEntry;
 import java.util.zip.ZipFile;
 
@@ -122,6 +124,9 @@
 	public static final String TAG_DISCOURAGED = "discouraged"; //$NON-NLS-1$
 	public static final String TAG_IGNORE_IF_BETTER = "ignoreifbetter"; //$NON-NLS-1$
 
+	// common index location for all workspaces
+	private static String SHARED_INDEX_LOCATION = System.getProperty("jdt.core.sharedIndexLocation"); //$NON-NLS-1$
+
 	/**
 	 * Describes the kind of classpath entry - one of
 	 * CPE_PROJECT, CPE_LIBRARY, CPE_SOURCE, CPE_VARIABLE or CPE_CONTAINER
@@ -1757,6 +1762,18 @@
 	public URL getLibraryIndexLocation() {
 		switch(getEntryKind()) {
 			case IClasspathEntry.CPE_LIBRARY :
+				if (SHARED_INDEX_LOCATION != null) {
+					try {
+						String pathString = getPath().toPortableString();
+						CRC32 checksumCalculator = new CRC32();
+						checksumCalculator.update(pathString.getBytes());
+						String fileName = Long.toString(checksumCalculator.getValue()) + ".index"; //$NON-NLS-1$
+						return new URL("file", null, Paths.get(SHARED_INDEX_LOCATION, fileName).toString()); //$NON-NLS-1$
+					} catch (MalformedURLException e1) {
+						Util.log(e1); // should not happen if protocol known (eg. 'file')
+					}
+				}
+				break;
 			case IClasspathEntry.CPE_VARIABLE :
 				break;
 			default :
@@ -2523,4 +2540,15 @@
 		}
 		return JavaModelStatus.VERIFIED_OK;
 	}
+
+	/*
+	 * For testing shared index location in JavaIndexTests only
+	 */
+	public static void setSharedIndexLocation(String value, Class<?> clazz) throws IllegalArgumentException{
+		if (clazz != null && "org.eclipse.jdt.core.tests.model.JavaIndexTests".equals(clazz.getName())) { //$NON-NLS-1$
+			SHARED_INDEX_LOCATION = value;
+		} else {
+			throw new IllegalArgumentException("Cannot set index location for specified test class"); //$NON-NLS-1$
+		}
+	}
 }
diff --git a/org.eclipse.jdt.core/pom.xml b/org.eclipse.jdt.core/pom.xml
index c2ce2e6..7180de1 100644
--- a/org.eclipse.jdt.core/pom.xml
+++ b/org.eclipse.jdt.core/pom.xml
@@ -14,11 +14,11 @@
   <parent>
     <artifactId>eclipse.jdt.core</artifactId>
     <groupId>eclipse.jdt.core</groupId>
-    <version>4.14.0-SNAPSHOT</version>
+    <version>4.15.0-SNAPSHOT</version>
   </parent>
   <groupId>org.eclipse.jdt</groupId>
   <artifactId>org.eclipse.jdt.core</artifactId>
-  <version>3.20.0-SNAPSHOT</version>
+  <version>3.20.100-SNAPSHOT</version>
   <packaging>eclipse-plugin</packaging>
 
   <properties>
diff --git a/pom.xml b/pom.xml
index bd8b151..c624d18 100644
--- a/pom.xml
+++ b/pom.xml
@@ -15,13 +15,13 @@
   <parent>
     <groupId>org.eclipse</groupId>
     <artifactId>eclipse-platform-parent</artifactId>
-    <version>4.14.0-SNAPSHOT</version>
+    <version>4.15.0-SNAPSHOT</version>
     <relativePath>../eclipse-platform-parent</relativePath>
   </parent>
 
   <groupId>eclipse.jdt.core</groupId>
   <artifactId>eclipse.jdt.core</artifactId>
-  <version>4.14.0-SNAPSHOT</version>
+  <version>4.15.0-SNAPSHOT</version>
   <packaging>pom</packaging>
 
   <properties>
diff --git a/tests-pom/pom.xml b/tests-pom/pom.xml
index f4da735..56f2e25 100644
--- a/tests-pom/pom.xml
+++ b/tests-pom/pom.xml
@@ -14,10 +14,10 @@
   <parent>
     <groupId>eclipse.jdt.core</groupId>
     <artifactId>eclipse.jdt.core</artifactId>
-    <version>4.14.0-SNAPSHOT</version>
+    <version>4.15.0-SNAPSHOT</version>
   </parent>
   <artifactId>tests-pom</artifactId>
-  <version>4.14.0-SNAPSHOT</version>
+  <version>4.15.0-SNAPSHOT</version>
   <packaging>pom</packaging>
   <properties>
     <code.ignoredWarnings>${tests.ignoredWarnings}</code.ignoredWarnings>