Author: bodewig
Date: Fri Jun 11 07:33:07 2010
New Revision: 953594

URL: http://svn.apache.org/viewvc?rev=953594&view=rev
Log:
<javac> faild for long command lines on OS/2.  PR 49425.  Submitted by <dmik 
DOT for MINUS maillists AT hugaida DOT com>

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

Modified: ant/core/trunk/WHATSNEW
URL: 
http://svn.apache.org/viewvc/ant/core/trunk/WHATSNEW?rev=953594&r1=953593&r2=953594&view=diff
==============================================================================
--- ant/core/trunk/WHATSNEW (original)
+++ ant/core/trunk/WHATSNEW Fri Jun 11 07:33:07 2010
@@ -51,6 +51,9 @@ Fixed bugs:
    itself.
    Bugzilla Report 49420.
 
+ * <javac> failed for long command lines on OS/2.
+   Bugzilla Report 49425.
+
 Other changes:
 --------------
 

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=953594&r1=953593&r2=953594&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
 Fri Jun 11 07:33:07 2010
@@ -45,7 +45,15 @@ import org.apache.tools.ant.taskdefs.con
  * @since Ant 1.3
  */
 public abstract class DefaultCompilerAdapter implements CompilerAdapter {
-    private static final int COMMAND_LINE_LIMIT = 4096;  // 4K
+    private static final int COMMAND_LINE_LIMIT;
+    static {
+        if (Os.isFamily("os/2")) {
+            // OS/2 CMD.EXE has a much smaller limit around 1K
+            COMMAND_LINE_LIMIT = 1000;
+        } else {
+            COMMAND_LINE_LIMIT = 4096;  // 4K
+        }
+    }
     // CheckStyle:VisibilityModifier OFF - bc
 
     private static final FileUtils FILE_UTILS = FileUtils.getFileUtils();


Reply via email to