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

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

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

paulk
Repository: groovy
Updated Branches:
  refs/heads/master bd5191d9a -> 2b7e15249


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

Branch: refs/heads/master
Commit: 2b7e15249060d90a9cd986b1f5e54f8279d0a69a
Parents: bd5191d
Author: paulk <[hidden email]>
Authored: Wed Dec 13 16:16:44 2017 +1000
Committer: paulk <[hidden email]>
Committed: Wed Dec 13 16:16:44 2017 +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/2b7e1524/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 c2e0641..9e5ace1 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
@@ -1082,8 +1082,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);