Repository: groovy
Updated Branches:
  refs/heads/GROOVY_2_5_X c5d514a4d -> 5ba6ca1c3


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/5ba6ca1c
Tree: http://git-wip-us.apache.org/repos/asf/groovy/tree/5ba6ca1c
Diff: http://git-wip-us.apache.org/repos/asf/groovy/diff/5ba6ca1c

Branch: refs/heads/GROOVY_2_5_X
Commit: 5ba6ca1c3e5d92c4e387231b932dfef62229e537
Parents: c5d514a
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:44:22 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/5ba6ca1c/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