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:51:14 GMT
Repository: groovy
Updated Branches:
  refs/heads/master e7766ffad -> 936a7a9fc


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

Branch: refs/heads/master
Commit: 936a7a9fc5547f9a41ebdf7091061f00dbaee151
Parents: e7766ff
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:51:02 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/936a7a9f/src/main/java/org/codehaus/groovy/antlr/java/Java2GroovyMain.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/codehaus/groovy/antlr/java/Java2GroovyMain.java b/src/main/java/org/codehaus/groovy/antlr/java/Java2GroovyMain.java
index d7384e0..3cd02a7 100644
--- a/src/main/java/org/codehaus/groovy/antlr/java/Java2GroovyMain.java
+++ b/src/main/java/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.DefaultParser;
-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 DefaultParser();
-            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