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

# Conflicts:
#	org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/SwitchExpressionTest.java
#	org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/parser/Scanner.java
#	org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/problem/ProblemReporter.java

Change-Id: I5149c4cc6bd8bb4c5e8d43031cb723b02d117069
diff --git a/org.eclipse.jdt.core.tests.builder/src/org/eclipse/jdt/core/tests/builder/PackageTests.java b/org.eclipse.jdt.core.tests.builder/src/org/eclipse/jdt/core/tests/builder/PackageTests.java
index 7be3f8b..11340bb 100644
--- a/org.eclipse.jdt.core.tests.builder/src/org/eclipse/jdt/core/tests/builder/PackageTests.java
+++ b/org.eclipse.jdt.core.tests.builder/src/org/eclipse/jdt/core/tests/builder/PackageTests.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2012 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
@@ -109,7 +109,7 @@
 
 		fullBuild();
 		expectingOnlySpecificProblemFor(aPath,
-			new Problem("", "The type A collides with a package", aPath, 24, 25, CategorizedProblem.CAT_TYPE, IMarker.SEVERITY_WARNING)); //$NON-NLS-1$ //$NON-NLS-2$
+			new Problem("", "The type A collides with a package", aPath, 24, 25, CategorizedProblem.CAT_TYPE, IMarker.SEVERITY_ERROR)); //$NON-NLS-1$ //$NON-NLS-2$
 		expectingOnlySpecificProblemFor(bPath,
 			new Problem("", "The declared package \"\" does not match the expected package \"p.A\"", bPath, 0, 1, CategorizedProblem.CAT_INTERNAL, IMarker.SEVERITY_ERROR)); //$NON-NLS-1$ //$NON-NLS-2$
 	}
diff --git a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/NullAnnotationTest.java b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/NullAnnotationTest.java
index 44a49cd..004c2ce 100644
--- a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/NullAnnotationTest.java
+++ b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/NullAnnotationTest.java
@@ -29,6 +29,7 @@
 import junit.framework.Test;
 
 import org.eclipse.jdt.core.JavaCore;
+import org.eclipse.jdt.core.tests.compiler.regression.AbstractRegressionTest.JavacTestOptions.Excuse;
 import org.eclipse.jdt.internal.compiler.classfmt.ClassFileConstants;
 import org.eclipse.jdt.internal.compiler.impl.CompilerOptions;
 
@@ -10972,6 +10973,7 @@
 			"	                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n" + 
 			"Dead code\n" + 
 			"----------\n";
+	runner.javacTestOptions = Excuse.EclipseWarningConfiguredAsError;
 	runner.runNegativeTest();
 }
 }
diff --git a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/NullReferenceTest.java b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/NullReferenceTest.java
index ed6a8d6..20134ad 100644
--- a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/NullReferenceTest.java
+++ b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/NullReferenceTest.java
@@ -17467,7 +17467,7 @@
 		"Statement unnecessarily nested within else clause. The corresponding then clause does not complete normally\n" + 
 		"----------\n";
 	runner.customOptions = getCompilerOptions();
-	runner.javacTestOptions = JavacTestOptions.Excuse.EclipseHasSomeMoreWarnings;
+	runner.javacTestOptions = JavacTestOptions.Excuse.EclipseWarningConfiguredAsError;
 	runner.runNegativeTest();
 }
 public void testBug435528_notaconstant() {
diff --git a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/StaticImportTest.java b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/StaticImportTest.java
index 91d76e7..3a1b07c 100644
--- a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/StaticImportTest.java
+++ b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/StaticImportTest.java
@@ -1,5 +1,5 @@
 /*******************************************************************************

- * Copyright (c) 2000, 2017 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

@@ -2459,7 +2459,7 @@
 				"}\n",

 			},

 			"----------\n" + 

-			"1. WARNING in node\\Test.java (at line 2)\n" + 

+			"1. ERROR in node\\Test.java (at line 2)\n" + 

 			"	public class Test {\n" + 

 			"	             ^^^^\n" + 

 			"The type Test collides with a package\n" + 

diff --git a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/SwitchExpressionTest.java b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/SwitchExpressionTest.java
index 4305c24..1fef2d0 100644
--- a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/SwitchExpressionTest.java
+++ b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/SwitchExpressionTest.java
@@ -23,7 +23,7 @@
 
 	static {
 //		TESTS_NUMBERS = new int [] { 40 };
-//		TESTS_NAMES = new String[] { "_testBug543240" };
+//		TESTS_NAMES = new String[] { "testBug548476" };
 	}
 	
 	public static Class<?> testClass() {
diff --git a/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/model/CompletionTests3.java b/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/model/CompletionTests3.java
index 77022c6..bdae724 100644
--- a/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/model/CompletionTests3.java
+++ b/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/model/CompletionTests3.java
@@ -39,7 +39,7 @@
 //https://bugs.eclipse.org/bugs/show_bug.cgi?id=338398
 public void testBug338398a() throws CoreException {
 	try {
-		createJavaProject("P", new String[] {"src"}, new String[]{"JCL_LIB"}, "bin", "1.7");
+		createJavaProject("P", new String[] {"src"}, new String[]{"JCL17_LIB"}, "bin", "1.7");
 		this.workingCopies = new ICompilationUnit[2];
 		this.workingCopies[0] = getWorkingCopy(
 			"/P/src/a/A.java",
@@ -74,7 +74,7 @@
 }
 public void _testBug338398b() throws CoreException {
 	try {
-		createJavaProject("P", new String[] {"src"}, new String[]{"JCL_LIB"}, "bin", "1.7");
+		createJavaProject("P", new String[] {"src"}, new String[]{"JCL17_LIB"}, "bin", "1.7");
 		this.workingCopies = new ICompilationUnit[2];
 		this.workingCopies[0] = getWorkingCopy(
 			"/P/src/a/A_CLASS.java",
@@ -100,7 +100,7 @@
 }
 public void _testBug338398c() throws CoreException {
 	try {
-		createJavaProject("P", new String[] {"src"}, new String[]{"JCL_LIB"}, "bin", "1.7");
+		createJavaProject("P", new String[] {"src"}, new String[]{"JCL17_LIB"}, "bin", "1.7");
 		this.workingCopies = new ICompilationUnit[2];
 		this.workingCopies[0] = getWorkingCopy(
 			"/P/src/a/A_CLASS.java",
@@ -126,7 +126,7 @@
 }
 public void testBug504095() throws CoreException {
 	try {
-		createJavaProject("P", new String[] {"src"}, new String[]{"JCL_LIB"}, "bin", "1.7");
+		createJavaProject("P", new String[] {"src"}, new String[]{"JCL17_LIB"}, "bin", "1.7");
 		this.workingCopies = new ICompilationUnit[2];
 		this.workingCopies[0] = getWorkingCopy(
 			"/P/src/a/Bug504095.java",
@@ -155,7 +155,7 @@
 }
 public void testBug425035a() throws CoreException {
 	try {
-		createJavaProject("P", new String[] {"src"}, new String[]{"JCL_LIB"}, "bin", "1.7");
+		createJavaProject("P", new String[] {"src"}, new String[]{"JCL17_LIB"}, "bin", "1.7");
 		this.workingCopies = new ICompilationUnit[3];
 		this.workingCopies[0] = getWorkingCopy(
 				"/P/src/a/Values.java",
@@ -196,7 +196,7 @@
 }
 public void testBug425035b() throws CoreException {
 	try {
-		createJavaProject("P", new String[] {"src"}, new String[]{"JCL_LIB"}, "bin", "1.7");
+		createJavaProject("P", new String[] {"src"}, new String[]{"JCL17_LIB"}, "bin", "1.7");
 		this.workingCopies = new ICompilationUnit[3];
 		this.workingCopies[0] = getWorkingCopy(
 				"/P/src/a/Values.java",
@@ -236,7 +236,7 @@
 }
 public void testBug425035c() throws CoreException {
 	try {
-		createJavaProject("P", new String[] {"src"}, new String[]{"JCL_LIB"}, "bin", "1.7");
+		createJavaProject("P", new String[] {"src"}, new String[]{"JCL17_LIB"}, "bin", "1.7");
 		this.workingCopies = new ICompilationUnit[3];
 		this.workingCopies[0] = getWorkingCopy(
 				"/P/src/a/Values.java",
@@ -277,7 +277,7 @@
 }
 public void testBug425035d() throws CoreException {
 	try {
-		createJavaProject("P", new String[] {"src"}, new String[]{"JCL_LIB"}, "bin", "1.7");
+		createJavaProject("P", new String[] {"src"}, new String[]{"JCL17_LIB"}, "bin", "1.7");
 		this.workingCopies = new ICompilationUnit[3];
 		this.workingCopies[0] = getWorkingCopy(
 				"/P/src/a/Values.java",
@@ -317,7 +317,7 @@
 }
 public void testBug425035e() throws CoreException {
 	try {
-		createJavaProject("P", new String[] {"src"}, new String[]{"JCL_LIB"}, "bin", "1.7");
+		createJavaProject("P", new String[] {"src"}, new String[]{"JCL17_LIB"}, "bin", "1.7");
 		this.workingCopies = new ICompilationUnit[3];
 		this.workingCopies[0] = getWorkingCopy(
 				"/P/src/a/Values.java",
@@ -357,7 +357,7 @@
 }
 public void testBug425035f() throws CoreException {
 	try {
-		createJavaProject("P", new String[] {"src"}, new String[]{"JCL_LIB"}, "bin", "1.7");
+		createJavaProject("P", new String[] {"src"}, new String[]{"JCL17_LIB"}, "bin", "1.7");
 		this.workingCopies = new ICompilationUnit[3];
 		this.workingCopies[0] = getWorkingCopy(
 				"/P/src/a/Values.java",
@@ -398,7 +398,7 @@
 }
 public void testBug425035_method_a() throws CoreException {
 	try {
-		createJavaProject("P", new String[] {"src"}, new String[]{"JCL_LIB"}, "bin", "1.7");
+		createJavaProject("P", new String[] {"src"}, new String[]{"JCL17_LIB"}, "bin", "1.7");
 		this.workingCopies = new ICompilationUnit[3];
 		this.workingCopies[0] = getWorkingCopy(
 				"/P/src/a/Values.java",
@@ -442,7 +442,7 @@
 }
 public void testBug425035_method_b() throws CoreException {
 	try {
-		createJavaProject("P", new String[] {"src"}, new String[]{"JCL_LIB"}, "bin", "1.7");
+		createJavaProject("P", new String[] {"src"}, new String[]{"JCL17_LIB"}, "bin", "1.7");
 		this.workingCopies = new ICompilationUnit[3];
 		this.workingCopies[0] = getWorkingCopy(
 				"/P/src/a/Values.java",
@@ -485,7 +485,7 @@
 }
 public void testBug425035_method_c() throws CoreException {
 	try {
-		createJavaProject("P", new String[] {"src"}, new String[]{"JCL_LIB"}, "bin", "1.7");
+		createJavaProject("P", new String[] {"src"}, new String[]{"JCL17_LIB"}, "bin", "1.7");
 		this.workingCopies = new ICompilationUnit[3];
 		this.workingCopies[0] = getWorkingCopy(
 				"/P/src/a/Values.java",
@@ -529,7 +529,7 @@
 }
 public void testBug425035_method_d() throws CoreException {
 	try {
-		createJavaProject("P", new String[] {"src"}, new String[]{"JCL_LIB"}, "bin", "1.7");
+		createJavaProject("P", new String[] {"src"}, new String[]{"JCL17_LIB"}, "bin", "1.7");
 		this.workingCopies = new ICompilationUnit[3];
 		this.workingCopies[0] = getWorkingCopy(
 				"/P/src/a/Values.java",
@@ -572,7 +572,7 @@
 }
 public void testBug425035_method_e() throws CoreException {
 	try {
-		createJavaProject("P", new String[] {"src"}, new String[]{"JCL_LIB"}, "bin", "1.7");
+		createJavaProject("P", new String[] {"src"}, new String[]{"JCL17_LIB"}, "bin", "1.7");
 		this.workingCopies = new ICompilationUnit[3];
 		this.workingCopies[0] = getWorkingCopy(
 				"/P/src/a/Values.java",
@@ -615,7 +615,7 @@
 }
 public void testBug425035_method_f() throws CoreException {
 	try {
-		createJavaProject("P", new String[] {"src"}, new String[]{"JCL_LIB"}, "bin", "1.7");
+		createJavaProject("P", new String[] {"src"}, new String[]{"JCL17_LIB"}, "bin", "1.7");
 		this.workingCopies = new ICompilationUnit[3];
 		this.workingCopies[0] = getWorkingCopy(
 				"/P/src/a/Values.java",
@@ -657,4 +657,37 @@
 		deleteProject("P");
 	}
 }
+public void testBug547256() throws CoreException {
+	try {
+		createJavaProject("P", new String[] {"src"}, new String[]{"JCL17_LIB"}, "bin", "1.7");
+		this.workingCopies = new ICompilationUnit[1];
+		this.workingCopies[0] = getWorkingCopy(
+				"/P/src/jdt/Something.java",
+				"package jdt;\n" + 
+				"public class Something {\n" + 
+				"	public static void main(String[] args) {\n" + 
+				"		done: for (int i = 0; i < 5; ++i) {\n" + 
+				"			if (i == 3) {\n" + 
+				"				break done;\n" + 
+				"			}\n" + 
+				"			System.out.println(i);\n" + 
+				"		}\n" +
+				"		arg\n" + 
+				"		System.out.println(\"done\");\n" + 
+				"	}\n" + 
+				"}\n");
+		CompletionTestsRequestor2 requestor = new CompletionTestsRequestor2(true);
+		requestor.setAllowsRequiredProposals(CompletionProposal.FIELD_REF, CompletionProposal.TYPE_REF, true);
+		String str = this.workingCopies[0].getSource();
+		String completeBehind = "arg";
+		int cursorLocation = str.lastIndexOf(completeBehind) + completeBehind.length();
+		this.workingCopies[0].codeComplete(cursorLocation, requestor, this.wcOwner);
+		assertResults(
+				"args[LOCAL_VARIABLE_REF]{args, null, [Ljava.lang.String;, args, null, 52}",
+				requestor.getResults());
+
+	} finally {
+		deleteProject("P");
+	}
+}
 }
diff --git a/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/model/JavaModelManagerTests.java b/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/model/JavaModelManagerTests.java
index 65b052d..0567191 100644
--- a/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/model/JavaModelManagerTests.java
+++ b/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/model/JavaModelManagerTests.java
@@ -23,11 +23,17 @@
 import org.eclipse.jdt.internal.core.JavaElement;
 import org.eclipse.jdt.internal.core.nd.indexer.Indexer;
 
+import junit.framework.Test;
+
 public class JavaModelManagerTests extends AbstractJavaModelTests {
 
 	private static final IProgressMonitor NULL_MONITOR = new NullProgressMonitor();
 	private static final String PROJECT_NAME = JavaModelManagerTests.class.getSimpleName();
 
+	public static Test suite() {
+		return buildModelTestSuite(JavaModelManagerTests.class);
+	}
+
 	public JavaModelManagerTests(String name) {
 		super(name);
 	}
diff --git a/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/rewrite/describing/ASTRewritingSwitchExpressionsTest.java b/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/rewrite/describing/ASTRewritingSwitchExpressionsTest.java
index 95464da..f7f9092 100644
--- a/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/rewrite/describing/ASTRewritingSwitchExpressionsTest.java
+++ b/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/rewrite/describing/ASTRewritingSwitchExpressionsTest.java
@@ -306,9 +306,7 @@
 		buf.append(" 				int z = 100;\n");
 		buf.append(" 				break z;\n");
 		buf.append("			}\n");
-		buf.append("			case 100, 200 -> {\n");
-		buf.append("    break 2048;\n");
-		buf.append("}\n");
+		buf.append("			case 100, 200 -> {break 2048;}\n");
 		buf.append("            default -> {\n");
 		buf.append("				break 12;\n");
 		buf.append("			}\n");
diff --git a/org.eclipse.jdt.core/batch/org/eclipse/jdt/internal/compiler/batch/ClasspathJep247Jdk12.java b/org.eclipse.jdt.core/batch/org/eclipse/jdt/internal/compiler/batch/ClasspathJep247Jdk12.java
index 0709ad5..c3a28d0 100644
--- a/org.eclipse.jdt.core/batch/org/eclipse/jdt/internal/compiler/batch/ClasspathJep247Jdk12.java
+++ b/org.eclipse.jdt.core/batch/org/eclipse/jdt/internal/compiler/batch/ClasspathJep247Jdk12.java
@@ -43,6 +43,7 @@
 public class ClasspathJep247Jdk12 extends ClasspathJep247 {
 
 	Map<String, IModule> modules;
+	static String MODULE_INFO = "module-info.sig"; //$NON-NLS-1$
 
 	public ClasspathJep247Jdk12(File jdkHome, String release, AccessRuleSet accessRuleSet) {
 		super(jdkHome, release, accessRuleSet);
@@ -173,9 +174,8 @@
 						public FileVisitResult visitFile(java.nio.file.Path f, BasicFileAttributes attrs) throws IOException {
 							if (attrs.isDirectory() || f.getNameCount() < 3) 
 								return FileVisitResult.CONTINUE;
-							byte[] content = null;
-							if (Files.exists(f)) {
-								content = JRTUtil.safeReadBytes(f);
+							if (f.getFileName().toString().equals(MODULE_INFO) && Files.exists(f)) {
+								byte[] content = JRTUtil.safeReadBytes(f);
 								if (content == null)
 									return FileVisitResult.CONTINUE;
 								Path m = f.subpath(1, f.getNameCount() - 1);
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/parser/Parser.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/parser/Parser.java
index 3f1d8f7..ed82f72 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/parser/Parser.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/parser/Parser.java
@@ -9314,7 +9314,7 @@
 	//if some declaration occurs.
 	this.nestedType--;
 	this.switchNestingLevel--;
-
+	this.scanner.breakPreviewAllowed = this.switchNestingLevel > 0;
 	int length;
 	SwitchStatement switchStatement = isStmt ? new SwitchStatement() : new SwitchExpression();
 	this.expressionLengthPtr--;
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/parser/Scanner.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/parser/Scanner.java
index 7a6196b..21b462d 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/parser/Scanner.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/parser/Scanner.java
@@ -116,6 +116,7 @@
 	public boolean fakeInModule = false;
 	boolean inCase = false;
 	/* package */ int yieldColons = -1;
+	boolean breakPreviewAllowed = false;
 	/**
 	 * The current context of the scanner w.r.t restricted keywords
 	 *
@@ -1305,8 +1306,10 @@
 	this.nextToken = unambiguousToken;
 }
 private void updateCase(int token) {
-	if (token == TokenNamecase) 
+	if (token == TokenNamecase) {
 		this.inCase = true;
+		this.breakPreviewAllowed = true;
+	}
 	if (token == TokenNameCOLON || token == TokenNameARROW) 
 		this.inCase = false;
 }
@@ -4896,6 +4899,9 @@
 	this.vanguardScanner.resetTo(this.startPosition, this.eofPosition - 1, isInModuleDeclaration(), this.scanContext);
 	return this.vanguardParser;
 }
+protected final boolean mayBeAtBreakPreview() {
+	return this.breakPreviewAllowed && this.lookBack[1] != TokenNameARROW;
+}
 
 protected final boolean maybeAtLambdaOrCast() { // Could the '(' we saw just now herald a lambda parameter list or a cast expression ? (the possible locations for both are identical.)
 
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/problem/ProblemReporter.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/problem/ProblemReporter.java
index 3b9c562..f0b386d 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/problem/ProblemReporter.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/problem/ProblemReporter.java
@@ -1615,13 +1615,12 @@
 
 	switch (problemID) {
 		case IProblem.VarargsConflict :
-			return ProblemSeverities.Warning;
- 		case IProblem.TypeCollidesWithPackage :
-			return ProblemSeverities.Warning;
  		case IProblem.SwitchExpressionsYieldUnqualifiedMethodWarning:
  		case IProblem.SwitchExpressionsYieldRestrictedGeneralWarning:
  		case IProblem.SwitchExpressionsYieldTypeDeclarationWarning:
  			return ProblemSeverities.Warning;
+ 		case IProblem.TypeCollidesWithPackage :
+			return ProblemSeverities.Error;
 
 		/*
 		 * Javadoc tags resolved references errors
diff --git a/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/ExternalFoldersManager.java b/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/ExternalFoldersManager.java
index e2ccdb1..e184a40 100644
--- a/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/ExternalFoldersManager.java
+++ b/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/ExternalFoldersManager.java
@@ -146,12 +146,13 @@
 		if (externalPath == null || externalPath.isEmpty()) {
 			return false;
 		}
-		
+
 		JavaModelManager manager = JavaModelManager.getJavaModelManager();
 		if (manager.isExternalFile(externalPath) || manager.isAssumedExternalFile(externalPath)) {
 			return false;
 		}
-		if (!externalPath.isAbsolute() || (WINDOWS && externalPath.getDevice() == null)) {
+		if (!externalPath.isAbsolute()
+				|| (WINDOWS && (externalPath.getDevice() == null && !externalPath.isUNC()))) {
 			// can be only project relative path
 			return false;
 		}
diff --git a/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/builder/ClasspathJrtWithReleaseOption.java b/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/builder/ClasspathJrtWithReleaseOption.java
index d507ed1..5a3dc95 100644
--- a/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/builder/ClasspathJrtWithReleaseOption.java
+++ b/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/builder/ClasspathJrtWithReleaseOption.java
@@ -51,10 +51,13 @@
 
 public class ClasspathJrtWithReleaseOption extends ClasspathJrt {
 
+	static String MODULE_INFO = "module-info.sig"; //$NON-NLS-1$
+
 	final String release;
 	String releaseInHex;
 	private String[] subReleases;
 	private java.nio.file.FileSystem fs;
+	protected Path releasePath;
 	protected Path modulePath;
 	private String modPathString;
 	private boolean isJRE12Plus;
@@ -134,15 +137,15 @@
 				return;
 			}
 		}
-		Path releasePath = this.fs.getPath("/"); //$NON-NLS-1$
-		this.isJRE12Plus = isJRE12Plus(releasePath);
+		this.releasePath = this.fs.getPath("/"); //$NON-NLS-1$
+		this.isJRE12Plus = isJRE12Plus(this.releasePath);
 		Path modPath = this.fs.getPath(this.releaseInHex + (this.isJRE12Plus ? "" : "-modules")); //$NON-NLS-1$ //$NON-NLS-2$
 		if (Files.exists(modPath)) {
 			this.modulePath = modPath;
 			this.modPathString = this.zipFilename + "|"+ modPath.toString(); //$NON-NLS-1$
 		}
 		
-		if (!Files.exists(releasePath.resolve(this.releaseInHex))) {
+		if (!Files.exists(this.releasePath.resolve(this.releaseInHex))) {
 			Exception e = new IllegalArgumentException("release " + this.release + " is not found in the system"); //$NON-NLS-1$//$NON-NLS-2$
 			throw new CoreException(new Status(IStatus.ERROR, JavaCore.PLUGIN_ID, e.getMessage(), e));
 		}
@@ -152,7 +155,7 @@
 		}
 		if (this.release != null) {
 			List<String> sub = new ArrayList<>();
-			try (DirectoryStream<java.nio.file.Path> stream = Files.newDirectoryStream(releasePath)) {
+			try (DirectoryStream<java.nio.file.Path> stream = Files.newDirectoryStream(this.releasePath)) {
 				for (final java.nio.file.Path subdir : stream) {
 					String rel = JRTUtil.sanitizedFileName(subdir);
 					if (rel.contains(this.releaseInHex)) {
@@ -226,10 +229,12 @@
 			return;
 		Set<IModule> cache = ModulesCache.get(jrt.modPathString);
 		if (cache == null) {
-			try (DirectoryStream<java.nio.file.Path> stream = Files.newDirectoryStream(jrt.modulePath)) {
+			try (DirectoryStream<java.nio.file.Path> stream = Files.newDirectoryStream(jrt.releasePath)) {
 				for (final java.nio.file.Path subdir : stream) {
-
-					Files.walkFileTree(subdir, Collections.EMPTY_SET, 1, new FileVisitor<java.nio.file.Path>() {
+					if (!subdir.getFileName().toString().contains(jrt.releaseInHex)) {
+						continue;
+					}
+					Files.walkFileTree(subdir, Collections.EMPTY_SET, 2, new FileVisitor<java.nio.file.Path>() {
 						@Override
 						public FileVisitResult preVisitDirectory(java.nio.file.Path dir, BasicFileAttributes attrs)
 								throws IOException {
@@ -239,14 +244,16 @@
 						@Override
 						public FileVisitResult visitFile(java.nio.file.Path f, BasicFileAttributes attrs)
 								throws IOException {
-							byte[] content = null;
-							if (Files.exists(f)) {
-								content = JRTUtil.safeReadBytes(f);
+							if (attrs.isDirectory() || f.getNameCount() < 3) {
+								return FileVisitResult.CONTINUE;
+							}
+							if (f.getFileName().toString().equals(MODULE_INFO)) {
+								byte[] content = JRTUtil.safeReadBytes(f);
 								if (content == null)
 									return FileVisitResult.CONTINUE;
 								jrt.acceptModule(content);
 							}
-							return FileVisitResult.CONTINUE;
+							return FileVisitResult.SKIP_SIBLINGS;
 						}
 
 						@Override