creadur-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pottlin...@apache.org
Subject svn commit: r1811445 - /creadur/rat/trunk/apache-rat-core/src/main/java/org/apache/rat/Report.java
Date Sat, 07 Oct 2017 20:43:21 GMT
Author: pottlinger
Date: Sat Oct  7 20:43:21 2017
New Revision: 1811445

URL: http://svn.apache.org/viewvc?rev=1811445&view=rev
Log:
RAT-240: Refactor parameter extraction

Modified:
    creadur/rat/trunk/apache-rat-core/src/main/java/org/apache/rat/Report.java

Modified: creadur/rat/trunk/apache-rat-core/src/main/java/org/apache/rat/Report.java
URL: http://svn.apache.org/viewvc/creadur/rat/trunk/apache-rat-core/src/main/java/org/apache/rat/Report.java?rev=1811445&r1=1811444&r2=1811445&view=diff
==============================================================================
--- creadur/rat/trunk/apache-rat-core/src/main/java/org/apache/rat/Report.java (original)
+++ creadur/rat/trunk/apache-rat-core/src/main/java/org/apache/rat/Report.java Sat Oct  7
20:43:21 2017
@@ -41,8 +41,8 @@ import java.util.List;
 
 public class Report {
     private static final String EXCLUDE_CLI = "e";
-    private static final char EXCLUDE_FILE_CLI = 'E';
-    private static final char STYLESHEET_CLI = 's';
+    private static final String EXCLUDE_FILE_CLI = "E";
+    private static final String STYLESHEET_CLI = "s";
     private static final String HELP = "h";
 
     public static final void main(String args[]) throws Exception {
@@ -172,14 +172,13 @@ public class Report {
                 .build();
         opts.addOption(exclude);
 
-        @SuppressWarnings("static-access") // ignore OptionBuilder design fault
-        final Option excludeFile = OptionBuilder
-                .withArgName("fileName")
-                .withLongOpt("exclude-file")
+        final Option excludeFile = Option.builder(EXCLUDE_FILE_CLI)
+                .argName("fileName")
+                .longOpt("exclude-file")
                 .hasArgs()
-                .withDescription("Excludes files matching regular expression in <file>
" +
+                .desc("Excludes files matching regular expression in <file> " +
                         "Note that --dir is required when using this parameter. ")
-                .create(EXCLUDE_FILE_CLI);
+                .build();
         opts.addOption(excludeFile);
 
         Option dir = new Option(



Mime
View raw message