Browse Source

fix Bug 59556 - support "jdk" package for Java 7+

Patch based on Chris Hegarty (Oracle) work.
"jdk" package has been introduced in JDK7 but is not known from Ant.
"jdk.net.Sockets" has been chosen as test class because it is available in JDK7, JDK8 and JDK9.
master
Vincent Privat Stefan Bodewig 9 years ago
parent
commit
fef3ea39f8
1 changed files with 4 additions and 0 deletions
  1. +4
    -0
      src/main/org/apache/tools/ant/util/JavaEnvUtils.java

+ 4
- 0
src/main/org/apache/tools/ant/util/JavaEnvUtils.java View File

@@ -430,6 +430,8 @@ public final class JavaEnvUtils {
case VERSION_1_9:
case VERSION_1_8:
case VERSION_1_7:
jrePackages.addElement("jdk");
// fall through
case VERSION_1_6:
case VERSION_1_5:
//In Java1.5, the apache stuff moved.
@@ -483,6 +485,8 @@ public final class JavaEnvUtils {
case VERSION_1_9:
case VERSION_1_8:
case VERSION_1_7:
tests.addElement("jdk.net.Sockets");
// fall through
case VERSION_1_6:
case VERSION_1_5:
tests.addElement(


Loading…
Cancel
Save