Browse Source

Jikes doesn't like -source 1.2 either, found by Gump running on Kaffe+Jikes

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

+ 8
- 1
src/main/org/apache/tools/ant/taskdefs/compilers/Jikes.java View File

@@ -186,7 +186,14 @@ public class Jikes extends DefaultCompilerAdapter {

if (attributes.getSource() != null) {
cmd.createArgument().setValue("-source");
cmd.createArgument().setValue(attributes.getSource());
String source = attributes.getSource();
if (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, Jikes doesn't like it
cmd.createArgument().setValue("1.3");
} else {
cmd.createArgument().setValue(source);
}
}

addCurrentCompilerArgs(cmd);


Loading…
Cancel
Save