Browse Source

Merge branch '1.9.x'

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

+ 5
- 1
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));
assertTrue(j + " is normalized and not in the JRE dir", !j.startsWith(javaHome));
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