Browse Source

Java 6's javac doesn't understand -source 1.1 either (found by Gump and the log4j build <http://gump.zones.apache.org/gump/test/logging-log4j-12/logging-log4j-12/gump_work/build_logging-log4j-12_logging-log4j-12.html>)

git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@529855 13f79535-47bb-0310-9956-ffa450edef68
master
Stefan Bodewig 18 years ago
parent
commit
781433259a
1 changed files with 3 additions and 3 deletions
  1. +3
    -3
      src/main/org/apache/tools/ant/taskdefs/compilers/DefaultCompilerAdapter.java

+ 3
- 3
src/main/org/apache/tools/ant/taskdefs/compilers/DefaultCompilerAdapter.java View File

@@ -321,10 +321,10 @@ public abstract class DefaultCompilerAdapter implements CompilerAdapter {
if (attributes.getSource() != null && !assumeJava13()) { if (attributes.getSource() != null && !assumeJava13()) {
cmd.createArgument().setValue("-source"); cmd.createArgument().setValue("-source");
String source = attributes.getSource(); String source = attributes.getSource();
if ((assumeJava14() || assumeJava15())
&& (source.equals("1.1") || source.equals("1.2"))) {
if (source.equals("1.1") || source.equals("1.2")) {
// support for -source 1.1 and -source 1.2 has been // support for -source 1.1 and -source 1.2 has been
// added with JDK 1.4.2 - and isn't present in 1.5.0 either
// added with JDK 1.4.2 - and isn't present in 1.5.0
// or 1.6.0 either
cmd.createArgument().setValue("1.3"); cmd.createArgument().setValue("1.3");
} else { } else {
cmd.createArgument().setValue(source); cmd.createArgument().setValue(source);


Loading…
Cancel
Save