Repository: groovy
Updated Branches:
  refs/heads/GROOVY_2_6_X a3ea40c82 -> f28b045ce


GROOVY-8295: Groovyc ant task can overflow Windows command line if classpath is 
large (remove duplicated parameter)


Project: http://git-wip-us.apache.org/repos/asf/groovy/repo
Commit: http://git-wip-us.apache.org/repos/asf/groovy/commit/f28b045c
Tree: http://git-wip-us.apache.org/repos/asf/groovy/tree/f28b045c
Diff: http://git-wip-us.apache.org/repos/asf/groovy/diff/f28b045c

Branch: refs/heads/GROOVY_2_6_X
Commit: f28b045ce218d97c809a21e2d26355c8e925fb23
Parents: a3ea40c
Author: paulk <pa...@asert.com.au>
Authored: Wed Dec 13 16:16:44 2017 +1000
Committer: paulk <pa...@asert.com.au>
Committed: Fri Feb 23 14:43:47 2018 +1000

----------------------------------------------------------------------
 .../src/main/java/org/codehaus/groovy/ant/Groovyc.java         | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/groovy/blob/f28b045c/subprojects/groovy-ant/src/main/java/org/codehaus/groovy/ant/Groovyc.java
----------------------------------------------------------------------
diff --git 
a/subprojects/groovy-ant/src/main/java/org/codehaus/groovy/ant/Groovyc.java 
b/subprojects/groovy-ant/src/main/java/org/codehaus/groovy/ant/Groovyc.java
index 224f37c..58cd3e7 100644
--- a/subprojects/groovy-ant/src/main/java/org/codehaus/groovy/ant/Groovyc.java
+++ b/subprojects/groovy-ant/src/main/java/org/codehaus/groovy/ant/Groovyc.java
@@ -1083,8 +1083,10 @@ public class Groovyc extends MatchingTask {
      * @param classpath
      */
     private void doNormalCommandLineList(List<String> commandLineList, 
List<String> jointOptions, Path classpath) {
-        commandLineList.add("--classpath");
-        commandLineList.add(getClasspathRelative(classpath));
+        if (!fork) {
+            commandLineList.add("--classpath");
+            commandLineList.add(classpath.toString());
+        }
         if (jointCompilation) {
             commandLineList.add("-j");
             commandLineList.addAll(jointOptions);

Reply via email to