This is an automated email from the ASF dual-hosted git repository. ggregory pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/commons-cli.git
commit 7108379d50938de7ac26de6d1c76ee6a0ef2845f Author: Gary Gregory <[email protected]> AuthorDate: Sat Nov 8 15:35:12 2025 -0500 Javadoc --- .../java/org/apache/commons/cli/CommandLine.java | 4 ++-- .../java/org/apache/commons/cli/OptionBuilder.java | 28 +++++++++++----------- src/main/java/org/apache/commons/cli/Parser.java | 4 ++-- .../java/org/apache/commons/cli/PosixParser.java | 10 ++++---- 4 files changed, 23 insertions(+), 23 deletions(-) diff --git a/src/main/java/org/apache/commons/cli/CommandLine.java b/src/main/java/org/apache/commons/cli/CommandLine.java index 2d944c71..67d70c77 100644 --- a/src/main/java/org/apache/commons/cli/CommandLine.java +++ b/src/main/java/org/apache/commons/cli/CommandLine.java @@ -267,7 +267,7 @@ public class CommandLine implements Serializable { /** * Gets the {@code Object} type of this {@code Option}. * - * @deprecated due to System.err message. Instead use getParsedOptionValue(char) + * @deprecated due to System.err message; use {@link #getParsedOptionValue(char)} instead. * @param optionChar the name of the option. * @return the type of opt. */ @@ -281,7 +281,7 @@ public class CommandLine implements Serializable { * * @param optionName the name of the option. * @return the type of this {@code Option}. - * @deprecated due to System.err message. Instead use getParsedOptionValue(String) + * @deprecated due to System.err message; use {@link #getParsedOptionValue(String)} instead. */ @Deprecated public Object getOptionObject(final String optionName) { diff --git a/src/main/java/org/apache/commons/cli/OptionBuilder.java b/src/main/java/org/apache/commons/cli/OptionBuilder.java index 66acd039..8b6ff0a9 100644 --- a/src/main/java/org/apache/commons/cli/OptionBuilder.java +++ b/src/main/java/org/apache/commons/cli/OptionBuilder.java @@ -231,8 +231,8 @@ public final class OptionBuilder { /** * The next Option created will have the specified argument value name. * - * @param name the name for the argument value - * @return the OptionBuilder instance + * @param name the name for the argument value. + * @return the OptionBuilder instance. */ public static OptionBuilder withArgName(final String name) { argName = name; @@ -242,8 +242,8 @@ public final class OptionBuilder { /** * The next Option created will have the specified description * - * @param newDescription a description of the Option's purpose - * @return the OptionBuilder instance + * @param newDescription a description of the Option's purpose. + * @return the OptionBuilder instance. */ public static OptionBuilder withDescription(final String newDescription) { description = newDescription; @@ -253,8 +253,8 @@ public final class OptionBuilder { /** * The next Option created will have the following long option value. * - * @param newLongopt the long option value - * @return the OptionBuilder instance + * @param newLongopt the long option value. + * @return the OptionBuilder instance. */ public static OptionBuilder withLongOpt(final String newLongopt) { longOption = newLongopt; @@ -264,8 +264,8 @@ public final class OptionBuilder { /** * The next Option created will have a value that will be an instance of {@code type}. * - * @param newType the type of the Options argument value - * @return the OptionBuilder instance + * @param newType the type of the Options argument value. + * @return the OptionBuilder instance. * @since 1.3 */ public static OptionBuilder withType(final Class<?> newType) { @@ -279,9 +279,9 @@ public final class OptionBuilder { * <strong>Note:</strong> this method is kept for binary compatibility and the input type is supposed to be a {@link Class} * object. * - * @param newType the type of the Options argument value - * @return the OptionBuilder instance - * @deprecated Since 1.3, use {@link #withType(Class)} instead + * @param newType the type of the Options argument value. + * @return the OptionBuilder instance. + * @deprecated Since 1.3, use {@link #withType(Class)} instead. */ @Deprecated public static OptionBuilder withType(final Object newType) { @@ -301,7 +301,7 @@ public final class OptionBuilder { * String propertyValue = opt.getValue(1); * </pre> * - * @return the OptionBuilder instance + * @return the OptionBuilder instance. */ public static OptionBuilder withValueSeparator() { valueSeparator = Char.EQUAL; @@ -323,7 +323,7 @@ public final class OptionBuilder { * </pre> * * @param sep The value separator to be used for the argument values. - * @return the OptionBuilder instance + * @return the OptionBuilder instance. */ public static OptionBuilder withValueSeparator(final char sep) { valueSeparator = sep; @@ -331,7 +331,7 @@ public final class OptionBuilder { } /** - * private constructor to prevent instances being created + * private constructor to prevent instances being created. */ private OptionBuilder() { // hide the constructor diff --git a/src/main/java/org/apache/commons/cli/Parser.java b/src/main/java/org/apache/commons/cli/Parser.java index 96cd34ea..65691a24 100644 --- a/src/main/java/org/apache/commons/cli/Parser.java +++ b/src/main/java/org/apache/commons/cli/Parser.java @@ -29,7 +29,7 @@ import org.apache.commons.cli.help.OptionFormatter; /** * Creates {@link CommandLine} instances. * - * @deprecated Since 1.3, the two-pass parsing with the flatten method is not enough flexible to handle complex cases + * @deprecated Since 1.3, the two-pass parsing with the flatten method is not enough flexible to handle complex cases. */ @Deprecated public abstract class Parser implements CommandLineParser { @@ -316,7 +316,7 @@ public abstract class Parser implements CommandLineParser { /** * Removes the option or its group from the list of expected elements. * - * @param opt + * @param opt the option. */ private void updateRequiredOptions(final Option opt) throws ParseException { // if the option is a required option remove the option from diff --git a/src/main/java/org/apache/commons/cli/PosixParser.java b/src/main/java/org/apache/commons/cli/PosixParser.java index 20fb3bfa..b4bf779c 100644 --- a/src/main/java/org/apache/commons/cli/PosixParser.java +++ b/src/main/java/org/apache/commons/cli/PosixParser.java @@ -28,21 +28,21 @@ import org.apache.commons.cli.help.OptionFormatter; * The class PosixParser provides an implementation of the {@link Parser#flatten(Options,String[],boolean) flatten} * method. * - * @deprecated Since 1.3, use the {@link DefaultParser} instead + * @deprecated Since 1.3, use the {@link DefaultParser} instead. */ @Deprecated public class PosixParser extends Parser { - /** Holder for flattened tokens */ + /** Holder for flattened tokens. */ private final List<String> tokens = new ArrayList<>(); - /** Specifies if bursting should continue */ + /** Specifies if bursting should continue.. */ private boolean eatTheRest; /** Holder for the current option */ private Option currentOption; - /** The command line Options */ + /** The command line Options. */ private Options options; /** @@ -55,7 +55,7 @@ public class PosixParser extends Parser { /** * Adds the remaining tokens to the processed tokens list. * - * @param iter An iterator over the remaining tokens + * @param iter An iterator over the remaining tokens. */ private void addRemaining(final Iterator<String> iter) { if (eatTheRest) {
