Browse Source

master requires Java8

master
Stefan Bodewig 9 years ago
parent
commit
84019606f3
2 changed files with 6 additions and 6 deletions
  1. +2
    -2
      src/main/org/apache/tools/ant/Project.java
  2. +4
    -4
      src/main/org/apache/tools/ant/util/JavaEnvUtils.java

+ 2
- 2
src/main/org/apache/tools/ant/Project.java View File

@@ -930,8 +930,8 @@ public class Project implements ResourceFactory {
setPropertyInternal(MagicNames.ANT_JAVA_VERSION, javaVersion); setPropertyInternal(MagicNames.ANT_JAVA_VERSION, javaVersion);


// sanity check // sanity check
if (!JavaEnvUtils.isAtLeastJavaVersion(JavaEnvUtils.JAVA_1_5)) {
throw new BuildException("Ant cannot work on Java prior to 1.5");
if (!JavaEnvUtils.isAtLeastJavaVersion(JavaEnvUtils.JAVA_1_8)) {
throw new BuildException("Ant cannot work on Java prior to 1.8");
} }
log("Detected Java version: " + javaVersion + " in: " log("Detected Java version: " + javaVersion + " in: "
+ System.getProperty("java.home"), MSG_VERBOSE); + System.getProperty("java.home"), MSG_VERBOSE);


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

@@ -258,8 +258,8 @@ public final class JavaEnvUtils {
* Compares the current Java version to the passed in String - * Compares the current Java version to the passed in String -
* assumes the argument is one of the constants defined in this * assumes the argument is one of the constants defined in this
* class. * class.
* Note that Ant now requires JDK 1.5+ so {@link #JAVA_1_0} through
* {@link #JAVA_1_4} need no longer be tested for.
* Note that Ant now requires JDK 1.8+ so {@link #JAVA_1_0} through
* {@link #JAVA_1_7} need no longer be tested for.
* @param version the version to check against the current version. * @param version the version to check against the current version.
* @return true if the version of Java is the same as the given version. * @return true if the version of Java is the same as the given version.
* @since Ant 1.5 * @since Ant 1.5
@@ -273,8 +273,8 @@ public final class JavaEnvUtils {
* Compares the current Java version to the passed in String - * Compares the current Java version to the passed in String -
* assumes the argument is one of the constants defined in this * assumes the argument is one of the constants defined in this
* class. * class.
* Note that Ant now requires JDK 1.5+ so {@link #JAVA_1_0} through
* {@link #JAVA_1_4} need no longer be tested for.
* Note that Ant now requires JDK 1.8+ so {@link #JAVA_1_0} through
* {@link #JAVA_1_7} need no longer be tested for.
* @param version the version to check against the current version. * @param version the version to check against the current version.
* @return true if the version of Java is the same or higher than the * @return true if the version of Java is the same or higher than the
* given version. * given version.


Loading…
Cancel
Save