Skip to content

Commit c12260c

Browse files
committed
Remove trailing white spaces on all lines.
1 parent 6490067 commit c12260c

33 files changed

Lines changed: 342 additions & 342 deletions

src/main/java/org/apache/commons/cli/AmbiguousOptionException.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ public Collection<String> getMatchingOptions()
5858

5959
/**
6060
* Build the exception message from the specified list of options.
61-
*
61+
*
6262
* @param option
6363
* @param matchingOptions
6464
* @return

src/main/java/org/apache/commons/cli/CommandLineParser.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ CommandLine parse(Options options, String[] arguments, Properties properties)
6161
* @param options the specified Options
6262
* @param arguments the command line arguments
6363
* @param stopAtNonOption if <code>true</code> an unrecognized argument stops
64-
* the parsing and the remaining arguments are added to the
64+
* the parsing and the remaining arguments are added to the
6565
* {@link CommandLine}s args list. If <code>false</code> an unrecognized
6666
* argument triggers a ParseException.
6767
*
@@ -79,7 +79,7 @@ CommandLine parse(Options options, String[] arguments, Properties properties)
7979
* @param arguments the command line arguments
8080
* @param properties command line option name-value pairs
8181
* @param stopAtNonOption if <code>true</code> an unrecognized argument stops
82-
* the parsing and the remaining arguments are added to the
82+
* the parsing and the remaining arguments are added to the
8383
* {@link CommandLine}s args list. If <code>false</code> an unrecognized
8484
* argument triggers a ParseException.
8585
*

src/main/java/org/apache/commons/cli/DefaultParser.java

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ public class DefaultParser implements CommandLineParser
3131
{
3232
/** The command-line instance. */
3333
protected CommandLine cmd;
34-
34+
3535
/** The current options. */
3636
protected Options options;
3737

@@ -44,13 +44,13 @@ public class DefaultParser implements CommandLineParser
4444

4545
/** The token currently processed. */
4646
protected String currentToken;
47-
47+
4848
/** The last option parsed. */
4949
protected Option currentOption;
50-
50+
5151
/** Flag indicating if tokens should no longer be analyzed and simply added as arguments of the command line. */
5252
protected boolean skipParsing;
53-
53+
5454
/** The required options and groups expected to be found when parsing the command line. */
5555
protected List expectedOpts;
5656

@@ -134,7 +134,7 @@ public CommandLine parse(final Options options, final String[] arguments, final
134134
* @param arguments the command line arguments
135135
* @param properties command line option name-value pairs
136136
* @param stopAtNonOption if <code>true</code> an unrecognized argument stops
137-
* the parsing and the remaining arguments are added to the
137+
* the parsing and the remaining arguments are added to the
138138
* {@link CommandLine}s args list. If <code>false</code> an unrecognized
139139
* argument triggers a ParseException.
140140
*
@@ -339,7 +339,7 @@ private boolean isOption(final String token)
339339

340340
/**
341341
* Tells if the token looks like a short option.
342-
*
342+
*
343343
* @param token
344344
*/
345345
private boolean isShortOption(final String token)
@@ -391,10 +391,10 @@ else if (getLongPrefix(token) != null && !token.startsWith("--"))
391391
}
392392

393393
/**
394-
* Handles an unknown token. If the token starts with a dash an
395-
* UnrecognizedOptionException is thrown. Otherwise the token is added
396-
* to the arguments of the command line. If the stopAtNonOption flag
397-
* is set, this stops the parsing and the remaining tokens are added
394+
* Handles an unknown token. If the token starts with a dash an
395+
* UnrecognizedOptionException is thrown. Otherwise the token is added
396+
* to the arguments of the command line. If the stopAtNonOption flag
397+
* is set, this stops the parsing and the remaining tokens are added
398398
* as-is in the arguments of the command line.
399399
*
400400
* @param token the command line token to handle
@@ -442,7 +442,7 @@ private void handleLongOption(final String token) throws ParseException
442442
* -L
443443
* --l
444444
* -l
445-
*
445+
*
446446
* @param token the command line token to handle
447447
*/
448448
private void handleLongOptionWithoutEqual(final String token) throws ParseException
@@ -639,7 +639,7 @@ private String getLongPrefix(final String token)
639639
break;
640640
}
641641
}
642-
642+
643643
return opt;
644644
}
645645

src/main/java/org/apache/commons/cli/HelpFormatter.java

Lines changed: 30 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434
* A formatter of help messages for command line options.
3535
*
3636
* <p>Example:</p>
37-
*
37+
*
3838
* <pre>
3939
* Options options = new Options();
4040
* options.addOption(OptionBuilder.withLongOpt("file")
@@ -47,24 +47,24 @@
4747
* .withDescription("Print the version of the application")
4848
* .create('v'));
4949
* options.addOption(OptionBuilder.withLongOpt("help").create('h'));
50-
*
50+
*
5151
* String header = "Do something useful with an input file\n\n";
5252
* String footer = "\nPlease report issues at http://example.com/issues";
53-
*
53+
*
5454
* HelpFormatter formatter = new HelpFormatter();
5555
* formatter.printHelp("myapp", header, options, footer, true);
5656
* </pre>
57-
*
57+
*
5858
* This produces the following output:
59-
*
59+
*
6060
* <pre>
6161
* usage: myapp -f &lt;FILE&gt; [-h] [-v]
6262
* Do something useful with an input file
63-
*
63+
*
6464
* -f,--file &lt;FILE&gt; The file to be processed
6565
* -h,--help
6666
* -v,--version Print the version of the application
67-
*
67+
*
6868
* Please report issues at http://example.com/issues
6969
* </pre>
7070
*/
@@ -90,9 +90,9 @@ public class HelpFormatter
9090
/** default prefix for long Option */
9191
public static final String DEFAULT_LONG_OPT_PREFIX = "--";
9292

93-
/**
93+
/**
9494
* default separator displayed between a long Option and its value
95-
*
95+
*
9696
* @since 1.3
9797
**/
9898
public static final String DEFAULT_LONG_OPT_SEPARATOR = " ";
@@ -177,7 +177,7 @@ public class HelpFormatter
177177

178178
/**
179179
* Comparator used to sort the options when they output in help text
180-
*
180+
*
181181
* Defaults to case-insensitive alphabetical sorting by option key
182182
*/
183183
protected Comparator<Option> optionComparator = new OptionComparator();
@@ -329,7 +329,7 @@ public String getLongOptPrefix()
329329
* Set the separator displayed between a long option and its value.
330330
* Ensure that the separator specified is supported by the parser used,
331331
* typically ' ' or '='.
332-
*
332+
*
333333
* @param longOptSeparator the separator, typically ' ' or '='.
334334
* @since 1.3
335335
*/
@@ -340,7 +340,7 @@ public void setLongOptSeparator(final String longOptSeparator)
340340

341341
/**
342342
* Returns the separator displayed between a long option and its value.
343-
*
343+
*
344344
* @return the separator
345345
* @since 1.3
346346
*/
@@ -408,7 +408,7 @@ public void printHelp(final String cmdLineSyntax, final Options options)
408408

409409
/**
410410
* Print the help for <code>options</code> with the specified
411-
* command line syntax. This method prints help information to
411+
* command line syntax. This method prints help information to
412412
* System.out.
413413
*
414414
* @param cmdLineSyntax the syntax for this application
@@ -438,7 +438,7 @@ public void printHelp(final String cmdLineSyntax, final String header, final Opt
438438

439439
/**
440440
* Print the help for <code>options</code> with the specified
441-
* command line syntax. This method prints help information to
441+
* command line syntax. This method prints help information to
442442
* System.out.
443443
*
444444
* @param cmdLineSyntax the syntax for this application
@@ -479,7 +479,7 @@ public void printHelp(final int width, final String cmdLineSyntax, final String
479479
* @param header the banner to display at the beginning of the help
480480
* @param options the Options instance
481481
* @param footer the banner to display at the end of the help
482-
* @param autoUsage whether to print an automatically generated
482+
* @param autoUsage whether to print an automatically generated
483483
* usage statement
484484
*/
485485
public void printHelp(final int width, final String cmdLineSyntax, final String header,
@@ -508,8 +508,8 @@ public void printHelp(final int width, final String cmdLineSyntax, final String
508508
*
509509
* @throws IllegalStateException if there is no room to print a line
510510
*/
511-
public void printHelp(final PrintWriter pw, final int width, final String cmdLineSyntax,
512-
final String header, final Options options, final int leftPad,
511+
public void printHelp(final PrintWriter pw, final int width, final String cmdLineSyntax,
512+
final String header, final Options options, final int leftPad,
513513
final int descPad, final String footer)
514514
{
515515
printHelp(pw, width, cmdLineSyntax, header, options, leftPad, descPad, footer, false);
@@ -569,7 +569,7 @@ public void printHelp(final PrintWriter pw, final int width, final String cmdLin
569569
/**
570570
* Prints the usage statement for the specified application.
571571
*
572-
* @param pw The PrintWriter to print the usage statement
572+
* @param pw The PrintWriter to print the usage statement
573573
* @param width The number of characters to display per line
574574
* @param app The application name
575575
* @param options The command line Options
@@ -596,7 +596,7 @@ public void printUsage(final PrintWriter pw, final int width, final String app,
596596
// check if the option is part of an OptionGroup
597597
final OptionGroup group = options.getOptionGroup(option);
598598

599-
// if the option is part of a group
599+
// if the option is part of a group
600600
if (group != null)
601601
{
602602
// and if the group has not already been processed
@@ -632,7 +632,7 @@ public void printUsage(final PrintWriter pw, final int width, final String app,
632632
}
633633

634634
/**
635-
* Appends the usage clause for an OptionGroup to a StringBuffer.
635+
* Appends the usage clause for an OptionGroup to a StringBuffer.
636636
* The clause is wrapped in square brackets if the group is required.
637637
* The display of the options is handled by appendOption
638638
* @param buff the StringBuffer to append to
@@ -670,7 +670,7 @@ private void appendOptionGroup(final StringBuffer buff, final OptionGroup group)
670670
}
671671

672672
/**
673-
* Appends the usage clause for an Option to a StringBuffer.
673+
* Appends the usage clause for an Option to a StringBuffer.
674674
*
675675
* @param buff the StringBuffer to append to
676676
* @param option the Option to append
@@ -691,14 +691,14 @@ private void appendOption(final StringBuffer buff, final Option option, final bo
691691
{
692692
buff.append("--").append(option.getLongOpt());
693693
}
694-
694+
695695
// if the Option has a value and a non blank argname
696696
if (option.hasArg() && (option.getArgName() == null || option.getArgName().length() != 0))
697697
{
698698
buff.append(option.getOpt() == null ? longOptSeparator : " ");
699699
buff.append("<").append(option.getArgName() != null ? option.getArgName() : getArgName()).append(">");
700700
}
701-
701+
702702
// if the Option is not a required option
703703
if (!required)
704704
{
@@ -722,7 +722,7 @@ public void printUsage(final PrintWriter pw, final int width, final String cmdLi
722722
}
723723

724724
/**
725-
* Print the help for the specified Options to the specified writer,
725+
* Print the help for the specified Options to the specified writer,
726726
* using the specified width, left padding and description padding.
727727
*
728728
* @param pw The printWriter to write the help to
@@ -733,7 +733,7 @@ public void printUsage(final PrintWriter pw, final int width, final String cmdLi
733733
* @param descPad the number of characters of padding to be prefixed
734734
* to each description line
735735
*/
736-
public void printOptions(final PrintWriter pw, final int width, final Options options,
736+
public void printOptions(final PrintWriter pw, final int width, final Options options,
737737
final int leftPad, final int descPad)
738738
{
739739
final StringBuffer sb = new StringBuffer();
@@ -791,9 +791,9 @@ protected StringBuffer renderOptions(final StringBuffer sb, final int width, fin
791791
final String lpad = createPadding(leftPad);
792792
final String dpad = createPadding(descPad);
793793

794-
// first create list containing only <lpad>-a,--aaa where
795-
// -a is opt and --aaa is long opt; in parallel look for
796-
// the longest opt string this list will be then used to
794+
// first create list containing only <lpad>-a,--aaa where
795+
// -a is opt and --aaa is long opt; in parallel look for
796+
// the longest opt string this list will be then used to
797797
// sort options ascending
798798
int max = 0;
799799
final List<StringBuffer> prefixList = new ArrayList<StringBuffer>();
@@ -885,7 +885,7 @@ protected StringBuffer renderOptions(final StringBuffer sb, final int width, fin
885885
*
886886
* @return the StringBuffer with the rendered Options contents.
887887
*/
888-
protected StringBuffer renderWrappedText(final StringBuffer sb, final int width,
888+
protected StringBuffer renderWrappedText(final StringBuffer sb, final int width,
889889
int nextLineTabStop, String text)
890890
{
891891
int pos = findWrapPos(text, width, 0);
@@ -968,7 +968,7 @@ private Appendable renderWrappedTextBlock(final StringBuffer sb, final int width
968968
/**
969969
* Finds the next text wrap position after <code>startPos</code> for the
970970
* text in <code>text</code> with the column width <code>width</code>.
971-
* The wrap point is the last position before startPos+width having a
971+
* The wrap point is the last position before startPos+width having a
972972
* whitespace character (space, \n, \r). If there is no whitespace character
973973
* before startPos+width, it will return startPos+width.
974974
*

0 commit comments

Comments
 (0)