groovy-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pa...@apache.org
Subject groovy git commit: GROOVY-8576 Remove Java2GroovyMain dependency on commons-cli
Date Thu, 10 May 2018 15:59:58 GMT
Repository: groovy
Updated Branches:
  refs/heads/GROOVY_2_4_X c80d02b13 -> 97c653d23


GROOVY-8576 Remove Java2GroovyMain dependency on commons-cli


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

Branch: refs/heads/GROOVY_2_4_X
Commit: 97c653d238567419f022d618ca1e5e804f147771
Parents: c80d02b
Author: Remko Popma <remkop@yahoo.com>
Authored: Thu May 10 23:25:07 2018 +0900
Committer: Paul King <paulk@asert.com.au>
Committed: Fri May 11 01:58:01 2018 +1000

----------------------------------------------------------------------
 .../codehaus/groovy/antlr/java/Java2GroovyMain.java    | 13 ++-----------
 1 file changed, 2 insertions(+), 11 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/groovy/blob/97c653d2/src/main/org/codehaus/groovy/antlr/java/Java2GroovyMain.java
----------------------------------------------------------------------
diff --git a/src/main/org/codehaus/groovy/antlr/java/Java2GroovyMain.java b/src/main/org/codehaus/groovy/antlr/java/Java2GroovyMain.java
index cba16db..3cd02a7 100644
--- a/src/main/org/codehaus/groovy/antlr/java/Java2GroovyMain.java
+++ b/src/main/org/codehaus/groovy/antlr/java/Java2GroovyMain.java
@@ -18,25 +18,16 @@
  */
 package org.codehaus.groovy.antlr.java;
 
-import org.apache.commons.cli.CommandLine;
-import org.apache.commons.cli.CommandLineParser;
-import org.apache.commons.cli.GroovyInternalPosixParser;
-import org.apache.commons.cli.Options;
-
 import java.util.Arrays;
 
 public class Java2GroovyMain {
 
     public static void main(String[] args) {
         try {
-            Options options = new Options();
-            CommandLineParser cliParser = new GroovyInternalPosixParser();
-            CommandLine cli = cliParser.parse(options, args);
-            String[] filenames = cli.getArgs();
-            if (filenames.length == 0) {
+            if (args.length == 0) {
                 System.err.println("Needs at least one filename");
             }
-            Java2GroovyProcessor.processFiles(Arrays.asList(filenames));
+            Java2GroovyProcessor.processFiles(Arrays.asList(args));
         } catch (Throwable t) {
             t.printStackTrace();
         }


Mime
View raw message