Browse Source

JDK 1.2's javac doesn't understand -source if forked, either - PR 32948

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

+ 4
- 1
WHATSNEW View File

@@ -239,7 +239,10 @@ Fixed bugs:
Bugzilla report 32667

* untar would go into infinite loop for some invalid tar files.
Bugzill report 29877
Bugzilla report 29877

* forked <javac> won't pass -source to a JDK 1.1 or 1.2 javac anymore.
Bugzilla report 32948

Changes from Ant 1.6.1 to Ant 1.6.2
===================================


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

@@ -1,5 +1,5 @@
/*
* Copyright 2001-2004 The Apache Software Foundation
* Copyright 2001-2005 The Apache Software Foundation
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -42,7 +42,11 @@ public class JavacExternal extends DefaultCompilerAdapter {

Commandline cmd = new Commandline();
cmd.setExecutable(getJavac().getJavacExecutable());
setupModernJavacCommandlineSwitches(cmd);
if (!assumeJava11() && !assumeJava12()) {
setupModernJavacCommandlineSwitches(cmd);
} else {
setupJavacCommandlineSwitches(cmd, true);
}
int firstFileName = assumeJava11() ? -1 : cmd.size();
logAndAddFilesToCompile(cmd);
//On VMS platform, we need to create a special java options file


Loading…
Cancel
Save