You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@creadur.apache.org by po...@apache.org on 2017/10/07 20:43:21 UTC
svn commit: r1811445 -
/creadur/rat/trunk/apache-rat-core/src/main/java/org/apache/rat/Report.java
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(