Skip to content

Commit 4994a04

Browse files
committed
Fix Javadoc warnings
1 parent 1d76328 commit 4994a04

11 files changed

Lines changed: 71 additions & 14 deletions

File tree

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

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,14 @@ Licensed to the Apache Software Foundation (ASF) under one or more
2525
*/
2626
@Deprecated
2727
public class BasicParser extends Parser {
28+
29+
/**
30+
* Constructs a new instance.
31+
*/
32+
public BasicParser() {
33+
// empty
34+
}
35+
2836
/**
2937
* <p>
3038
* A simple implementation of {@link Parser}'s abstract {@link Parser#flatten(Options, String[], boolean) flatten}

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

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,14 @@ Licensed to the Apache Software Foundation (ASF) under one or more
2828
*/
2929
@Deprecated
3030
public class GnuParser extends Parser {
31+
32+
/**
33+
* Constructs a new instance.
34+
*/
35+
public GnuParser() {
36+
// empty
37+
}
38+
3139
/**
3240
* This flatten method does so using the following rules:
3341
* <ol>

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

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,13 @@ public static class Builder implements Supplier<HelpFormatter> {
7878
// TODO All other instance HelpFormatter instance variables.
7979
// Make HelpFormatter immutable for 2.0
8080

81+
/**
82+
* Constructs a new instance.
83+
*/
84+
public Builder() {
85+
// empty
86+
}
87+
8188
/**
8289
* A function to convert a description (not null) and a deprecated Option (not null) to help description
8390
*/

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

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,13 @@ Licensed to the Apache Software Foundation (ASF) under one or more
2828
*/
2929
public class OptionGroup implements Serializable {
3030

31+
/**
32+
* Constructs a new instance.
33+
*/
34+
public OptionGroup() {
35+
// empty
36+
}
37+
3138
/** The serial version UID. */
3239
private static final long serialVersionUID = 1L;
3340

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

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,14 @@ Licensed to the Apache Software Foundation (ASF) under one or more
3939
* @see org.apache.commons.cli.CommandLine
4040
*/
4141
public class Options implements Serializable {
42+
43+
/**
44+
* Constructs new instance.
45+
*/
46+
public Options() {
47+
// empty
48+
}
49+
4250
/** The serial version UID. */
4351
private static final long serialVersionUID = 1L;
4452

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

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ Licensed to the Apache Software Foundation (ASF) under one or more
3131
*/
3232
@Deprecated
3333
public abstract class Parser implements CommandLineParser {
34+
3435
/** CommandLine instance */
3536
protected CommandLine cmd;
3637

@@ -40,6 +41,13 @@ public abstract class Parser implements CommandLineParser {
4041
/** List of required options strings */
4142
private List requiredOptions;
4243

44+
/**
45+
* Constructs a new instance.
46+
*/
47+
public Parser() {
48+
// empty
49+
}
50+
4351
/**
4452
* Throws a {@link MissingOptionException} if all of the required options are not present.
4553
*

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ public class PatternOptionBuilder {
7777
/**
7878
* Deprecated, only provides static methods.
7979
*
80-
* @deprecated Will be private or class will be final.
80+
* @deprecated Will be private or class will be final.
8181
*/
8282
@Deprecated
8383
public PatternOptionBuilder() {

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

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ Licensed to the Apache Software Foundation (ASF) under one or more
3030
*/
3131
@Deprecated
3232
public class PosixParser extends Parser {
33+
3334
/** Holder for flattened tokens */
3435
private final List<String> tokens = new ArrayList<>();
3536

@@ -42,6 +43,13 @@ public class PosixParser extends Parser {
4243
/** The command line Options */
4344
private Options options;
4445

46+
/**
47+
* Constructs a new instance.
48+
*/
49+
public PosixParser() {
50+
// empty
51+
}
52+
4553
/**
4654
* Breaks {@code token} into its constituent parts using the following algorithm.
4755
*

src/main/javadoc/overview.html

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -14,18 +14,21 @@
1414
See the License for the specific language governing permissions and
1515
limitations under the License.
1616
-->
17+
<html>
18+
<head>
19+
<title>Apache Commons CLI Overview</title>
20+
</head>
1721
<body>
22+
<img src="../images/commons-logo.png" alt="Apache Commons CLI">
1823

19-
<p>Apache Commons CLI.</p>
24+
<p>The Commons CLI component parses command-line arguments for your application.</p>
2025

21-
<p>The commons-cli package aides in parsing command-line arguments.</p>
22-
23-
<p>Allow command-line arguments to be parsed against a descriptor of
26+
<p>Commons CLI parses command-line arguments using a descriptor of
2427
valid options (long and short), potentially with arguments.</p>
2528

26-
<p>command-line arguments may be of the typical {@code String[]}
27-
form, but also may be a {@code java.util.List}. Indexes allow
28-
for parsing only a portion of the command-line. Also, functionality
29+
<p>Command-line arguments may be of the typical {@code String[]}
30+
form, but also may be a {@code java.util.List}. Indexes allow
31+
for parsing only a portion of the command-line. Also, functionality
2932
for parsing the command-line in phases is built in, allowing for
3033
'cvs-style' command-lines, where some global options are specified
3134
before a 'command' argument, and command-specific options are

src/site/xdoc/index.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,8 @@
2828
<body>
2929
<section name="Apache Commons CLI">
3030
<p>
31-
The Apache Commons CLI library provides an API for parsing command line options passed to programs.
32-
It's also able to print help messages detailing the options available for a command line tool.
31+
The Apache Commons CLI library provides an API for parsing command-line options passed to an application.
32+
It can also print help detailing the options available for that application.
3333
</p>
3434
<p>
3535
Commons CLI supports different types of options:

0 commit comments

Comments
 (0)