diff --git a/WHATSNEW b/WHATSNEW index 50ef40f54..b56993bb7 100644 --- a/WHATSNEW +++ b/WHATSNEW @@ -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 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 =================================== diff --git a/src/main/org/apache/tools/ant/taskdefs/compilers/JavacExternal.java b/src/main/org/apache/tools/ant/taskdefs/compilers/JavacExternal.java index 3191c52a1..6c6bb0f73 100644 --- a/src/main/org/apache/tools/ant/taskdefs/compilers/JavacExternal.java +++ b/src/main/org/apache/tools/ant/taskdefs/compilers/JavacExternal.java @@ -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