ant-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bode...@apache.org
Subject svn commit: r1237420 - in /ant/core/trunk/src: main/org/apache/tools/ant/taskdefs/compilers/DefaultCompilerAdapter.java tests/junit/org/apache/tools/ant/taskdefs/compilers/DefaultCompilerAdapterTest.java
Date Sun, 29 Jan 2012 19:17:57 GMT
Author: bodewig
Date: Sun Jan 29 19:17:57 2012
New Revision: 1237420

URL: http://svn.apache.org/viewvc?rev=1237420&view=rev
Log:
either Java 1.5 accepts -source 1.2 or it doesn't, be consistent

Modified:
    ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/compilers/DefaultCompilerAdapter.java
    ant/core/trunk/src/tests/junit/org/apache/tools/ant/taskdefs/compilers/DefaultCompilerAdapterTest.java

Modified: ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/compilers/DefaultCompilerAdapter.java
URL: http://svn.apache.org/viewvc/ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/compilers/DefaultCompilerAdapter.java?rev=1237420&r1=1237419&r2=1237420&view=diff
==============================================================================
--- ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/compilers/DefaultCompilerAdapter.java
(original)
+++ ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/compilers/DefaultCompilerAdapter.java
Sun Jan 29 19:17:57 2012
@@ -354,9 +354,9 @@ public abstract class DefaultCompilerAda
             if (t.equals("1.1") || t.equals("1.2") || t.equals("1.3")
                 || t.equals("1.4")) {
                 String s = t;
-                if (t.equals("1.1")) {
-                    // 1.5.0 doesn't support -source 1.1
-                    s = "1.2";
+                if (t.equals("1.1") || t.equals("1.2")) {
+                    // 1.5.0 doesn't support -source 1.1 or 1.2
+                    s = "1.3";
                 }
                 setImplicitSourceSwitch((assumeJava15() || assumeJava16())
                                         ? "1.5 in JDK 1.5 and 1.6"

Modified: ant/core/trunk/src/tests/junit/org/apache/tools/ant/taskdefs/compilers/DefaultCompilerAdapterTest.java
URL: http://svn.apache.org/viewvc/ant/core/trunk/src/tests/junit/org/apache/tools/ant/taskdefs/compilers/DefaultCompilerAdapterTest.java?rev=1237420&r1=1237419&r2=1237420&view=diff
==============================================================================
--- ant/core/trunk/src/tests/junit/org/apache/tools/ant/taskdefs/compilers/DefaultCompilerAdapterTest.java
(original)
+++ ant/core/trunk/src/tests/junit/org/apache/tools/ant/taskdefs/compilers/DefaultCompilerAdapterTest.java
Sun Jan 29 19:17:57 2012
@@ -138,13 +138,12 @@ public class DefaultCompilerAdapterTest 
     }
 
     private void commonSourceDowngrades(String javaVersion) {
-        // FIXME, should be minimum 1.3 as -source
-        testSource("1.2", javaVersion,
+        testSource("1.3", javaVersion,
                    "If you specify -target 1.1 you now must also specify"
-                   + " -source 1.2", "1.1");
-        testSource("1.2", javaVersion,
+                   + " -source 1.3", "1.1");
+        testSource("1.3", javaVersion,
                    "If you specify -target 1.2 you now must also specify"
-                   + " -source 1.2", "1.2");
+                   + " -source 1.3", "1.2");
         testSource("1.3", javaVersion,
                    "If you specify -target 1.3 you now must also specify"
                    + " -source 1.3", "1.3");



Mime
View raw message