Bug 527861 - [9] JarSourceLookupTests.testTranslateContainers fails when
run on JDK 9

Change-Id: Ia1402e66d8d1512697d3430717cbcc87587a6050
diff --git a/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/sourcelookup/JarSourceLookupTests.java b/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/sourcelookup/JarSourceLookupTests.java
index ab14790..6124c20 100644
--- a/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/sourcelookup/JarSourceLookupTests.java
+++ b/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/sourcelookup/JarSourceLookupTests.java
@@ -136,7 +136,12 @@
 		createLaunchConfiguration(fgJarProject, LAUNCHCONFIGURATIONS, A_RUN_JAR);
 		ILaunchConfiguration config = getLaunchConfiguration(fgJarProject, LAUNCHCONFIGURATIONS, A_RUN_JAR);
 		IRuntimeClasspathEntry[] entries = JavaRuntime.computeUnresolvedSourceLookupPath(config);
-		assertEquals("There should be 2 containers returned (JRE and classpath)", 2, entries.length);
+		if (JavaRuntime.isModularConfiguration(config)) {
+			// JRE Container is also part of it from Java 9 onwards
+			assertEquals("There should be 3 containers returned (JRE and classpath)", 3, entries.length);
+		} else {
+			assertEquals("There should be 2 containers returned (JRE and classpath)", 2, entries.length);
+		}
 		IRuntimeClasspathEntry[] resolved = JavaRuntime.resolveSourceLookupPath(entries, config);
 		ISourceContainer[] containers = JavaSourceLookupUtil.translate(resolved);
 		try {