Browse Source

Java9 tool location changes now show up on Jenkins

master
Stefan Bodewig 7 years ago
parent
commit
f0322a2f4b
1 changed files with 4 additions and 0 deletions
  1. +4
    -0
      src/tests/junit/org/apache/tools/ant/util/JavaEnvUtilsTest.java

+ 4
- 0
src/tests/junit/org/apache/tools/ant/util/JavaEnvUtilsTest.java View File

@@ -67,7 +67,11 @@ public class JavaEnvUtilsTest {
assertTrue(j + " is absolute", (new File(j)).isAbsolute());
String javaHomeParent = FILE_UTILS.normalize(javaHome + "/..").getAbsolutePath();
assertTrue(j + " is normalized and in the JDK dir", j.startsWith(javaHomeParent));
if (JavaEnvUtils.isAtLeastJavaVersion(JavaEnvUtils.JAVA_9)) {
assertTrue(j + " is normalized and not in the JRE dir", j.startsWith(javaHome));
} else {
assertTrue(j + " is normalized and not in the JRE dir", !j.startsWith(javaHome));
}
} catch (AssertionError e) {
// java.home is bogus
assertEquals("javac.exe", j);


Loading…
Cancel
Save