Browse Source

let's hope 1.6 will support -source 1.1

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

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

@@ -314,7 +314,8 @@ public abstract class DefaultCompilerAdapter implements CompilerAdapter {
if (attributes.getSource() != null && !assumeJava13()) {
cmd.createArgument().setValue("-source");
String source = attributes.getSource();
if (source.equals("1.1") || source.equals("1.2")) {
if ((assumeJava14() || assumeJava15())
&& (source.equals("1.1") || source.equals("1.2"))) {
// 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
cmd.createArgument().setValue("1.3");
@@ -328,7 +329,7 @@ public abstract class DefaultCompilerAdapter implements CompilerAdapter {
String s = t;
if (t.equals("1.1")) {
// 1.5.0 doesn't support -source 1.1
s = "1.3";
s = "1.2";
}
attributes.log("", Project.MSG_WARN);
attributes.log(" WARNING", Project.MSG_WARN);


Loading…
Cancel
Save