update jdt.core to I20190307-0500 for 4.11RC2
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 1504327..e2fe76e 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
@@ -9572,4 +9572,17 @@
 				"}\n"
 			});
 	}
+	public void testBug545121() {
+		runConformTest(
+			new String[] {
+				"X.java",
+				"public class X {\n" + 
+				"	<T extends V, U extends T, V> void foo(U arg1, T arg2, V arg3) {}\n" + 
+				"\n" + 
+				"	void check() {\n" + 
+				"		foo((Long) 0l, 0d, \"\");\n" + 
+				"	}\n" + 
+				"}\n"
+			});
+	}
 }
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/CaptureBinding18.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/CaptureBinding18.java
index db3f1d7..7bf4782 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/CaptureBinding18.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/CaptureBinding18.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2013, 2014 GK Software AG.
+ * Copyright (c) 2013, 2019 GK Software AG.
  *
  * This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License 2.0
@@ -156,22 +156,15 @@
 					rightIntersectingTypes = ((IntersectionTypeBinding18) otherType).intersectingTypes;
 				}
 				if (rightIntersectingTypes != null) {
-					int numRequired = rightIntersectingTypes.length;
-					TypeBinding[] required = new TypeBinding[numRequired];
-					System.arraycopy(rightIntersectingTypes, 0, required, 0, numRequired);
-					for (int i = 0; i < length; i++) {
-						TypeBinding provided = this.upperBounds[i];
-						for (int j = 0; j < required.length; j++) {
-							if (required[j] == null) continue;
-							if (provided.isCompatibleWith(required[j], captureScope)) {
-								required[j] = null;
-								if (--numRequired == 0)
-									return true;
-								break;
-							}
+					nextRequired:
+					for (TypeBinding required : rightIntersectingTypes) {
+						for (TypeBinding provided : this.upperBounds) {
+							if (provided.isCompatibleWith(required, captureScope))
+								continue nextRequired;
 						}
+						return false;
 					}
-					return false;
+					return true;
 				}
 
 				for (int i = 0; i < length; i++) {
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/IntersectionTypeBinding18.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/IntersectionTypeBinding18.java
index a930685..944631b 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/IntersectionTypeBinding18.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/IntersectionTypeBinding18.java
@@ -187,22 +187,15 @@
 			rightIntersectingTypes = ((IntersectionTypeBinding18) right).intersectingTypes;
 		}
 		if (rightIntersectingTypes != null) {
-			int numRequired = rightIntersectingTypes.length;
-			TypeBinding[] required = new TypeBinding[numRequired];
-			System.arraycopy(rightIntersectingTypes, 0, required, 0, numRequired);
-			for (int i = 0; i < this.length; i++) {
-				TypeBinding provided = this.intersectingTypes[i];
-				for (int j = 0; j < required.length; j++) {
-					if (required[j] == null) continue;
-					if (provided.isCompatibleWith(required[j], scope)) {
-						required[j] = null;
-						if (--numRequired == 0)
-							return true;
-						break;
-					}
+			nextRequired:
+			for (TypeBinding required : rightIntersectingTypes) {
+				for (TypeBinding provided : this.intersectingTypes) {
+					if (provided.isCompatibleWith(required, scope))
+						continue nextRequired;
 				}
+				return false;
 			}
-			return false;
+			return true;
 		}
 
 		// normal case:
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/util/JRTUtil.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/util/JRTUtil.java
index f6903f8..51bfc33 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/util/JRTUtil.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/util/JRTUtil.java
@@ -254,6 +254,9 @@
 			try (DirectoryStream<java.nio.file.Path> stream = Files.newDirectoryStream(releasePath)) {
 				for (final java.nio.file.Path subdir: stream) {
 					String r = subdir.getFileName().toString();
+					if (r.endsWith("/")) { //$NON-NLS-1$
+						r = r.substring(0, r.length() - 1);
+					}
 					if (r.contains(this.releaseInHex)) {
 						sub.add(r);
 					} else {
diff --git a/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/JavaProject.java b/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/JavaProject.java
index abe02ff..0fcdea6 100644
--- a/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/JavaProject.java
+++ b/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/JavaProject.java
@@ -940,7 +940,11 @@
 
 				@Override
 				public FileVisitResult visitModule(java.nio.file.Path mod) throws IOException {
-					JrtPackageFragmentRoot root = new JrtPackageFragmentRoot(imagePath, mod.toString(), JavaProject.this);
+					String name = mod.toString();
+					if (name.endsWith("/")) { //$NON-NLS-1$
+						name = name.substring(0, name.length() - 1);
+					}
+					JrtPackageFragmentRoot root = new JrtPackageFragmentRoot(imagePath, name, JavaProject.this);
 					roots.add(root);
 					if (rootToResolvedEntries != null) 
 						rootToResolvedEntries.put(root, ((ClasspathEntry)resolvedEntry).combineWith((ClasspathEntry) referringEntry));
diff --git a/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/JrtPackageFragmentRoot.java b/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/JrtPackageFragmentRoot.java
index cd3e815..93c1781 100644
--- a/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/JrtPackageFragmentRoot.java
+++ b/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/JrtPackageFragmentRoot.java
@@ -79,7 +79,11 @@
 
 				@Override
 				public FileVisitResult visitModule(Path mod) throws IOException {
-					if (!JrtPackageFragmentRoot.this.moduleName.equals(mod.toString())) {
+					String name = mod.toString();
+					if (name.endsWith("/")) { //$NON-NLS-1$
+						name = name.substring(0, name.length() - 1);
+					}
+					if (!JrtPackageFragmentRoot.this.moduleName.equals(name)) {
 						return FileVisitResult.SKIP_SUBTREE;
 					}
 					return FileVisitResult.CONTINUE;
diff --git a/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/builder/ClasspathJrt.java b/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/builder/ClasspathJrt.java
index 50cfd27..7f7a9f4 100644
--- a/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/builder/ClasspathJrt.java
+++ b/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/builder/ClasspathJrt.java
@@ -106,6 +106,9 @@
 				}
 				this.packageSet = new SimpleSet(41);
 				this.packageSet.add(""); //$NON-NLS-1$
+				if (name.endsWith("/")) { //$NON-NLS-1$
+					name = name.substring(0, name.length() - 1);
+				}
 				packagesInModule.put(name, this.packageSet);
 				return FileVisitResult.CONTINUE;
 			}
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 a5d8446..6207656 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
@@ -92,8 +92,11 @@
 	private boolean isJRE12Plus(Path path) {
 		try (DirectoryStream<java.nio.file.Path> stream = Files.newDirectoryStream(path)) {
 			for (final java.nio.file.Path subdir : stream) {
-				String rel = subdir.getFileName().toString();
-				if (Files.exists(this.fs.getPath(rel, "system-modules"))) { //$NON-NLS-1$
+				if (Files.exists(subdir.resolve("system-modules"))) { //$NON-NLS-1$
+					String rel = subdir.getFileName().toString();
+					if (rel.endsWith("/")) { //$NON-NLS-1$
+						rel = rel.substring(0, rel.length() - 1);
+					}
 					int parseInt = Integer.parseInt(rel, 16);
 					return (parseInt > 11);
 				}
@@ -155,6 +158,9 @@
 			try (DirectoryStream<java.nio.file.Path> stream = Files.newDirectoryStream(releasePath)) {
 				for (final java.nio.file.Path subdir : stream) {
 					String rel = subdir.getFileName().toString();
+					if (rel.endsWith("/")) { //$NON-NLS-1$
+						rel = rel.substring(0, rel.length() - 1);
+					}
 					if (rel.contains(this.releaseInHex)) {
 						sub.add(rel);
 					} else {
@@ -205,6 +211,9 @@
 							String name = mod.getName(1).toString();
 							this.packageSet = new SimpleSet(41);
 							this.packageSet.add(""); //$NON-NLS-1$
+							if (name.endsWith("/")) { //$NON-NLS-1$
+								name = name.substring(0, name.length() - 1);
+							}
 							packagesInModule.put(name, this.packageSet);
 							return FileVisitResult.CONTINUE;
 						}