You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@commons.apache.org by gg...@apache.org on 2024/05/28 16:42:51 UTC
svn commit: r1086566 [10/19] - in /websites/production/commons/content/proper/commons-cli: ./ apidocs/ apidocs/org/apache/commons/cli/ apidocs/org/apache/commons/cli/class-use/ apidocs/src-html/org/apache/commons/cli/ jacoco/ jacoco/org.apache.commons....
Modified: websites/production/commons/content/proper/commons-cli/jacoco/org.apache.commons.cli/HelpFormatter.java.html
==============================================================================
--- websites/production/commons/content/proper/commons-cli/jacoco/org.apache.commons.cli/HelpFormatter.java.html (original)
+++ websites/production/commons/content/proper/commons-cli/jacoco/org.apache.commons.cli/HelpFormatter.java.html Tue May 28 16:42:49 2024
@@ -71,61 +71,61 @@ public class HelpFormatter {
*
* @since 1.7.0
*/
-<span class="nc" id="L74"> public static final class Builder implements Supplier<HelpFormatter> {</span>
+<span class="fc" id="L74"> public static final class Builder implements Supplier<HelpFormatter> {</span>
// TODO All other instance HelpFormatter instance variables.
// Make HelpFormatter immutable for 2.0
/**
* A function to convert a description (not null) and a deprecated Option (not null) to help description
*/
-<span class="nc" id="L81"> private static final Function<Option, String> DEFAULT_DEPRECATED_FORMAT = o -> "[Deprecated] " + getDescription(o);</span>
+<span class="fc" id="L81"> private static final Function<Option, String> DEFAULT_DEPRECATED_FORMAT = o -> "[Deprecated] " + getDescription(o);</span>
/**
* Formatter for deprecated options.
*/
-<span class="nc" id="L86"> private Function<Option, String> deprecatedFormatFunc = DEFAULT_DEPRECATED_FORMAT;</span>
+<span class="fc" id="L86"> private Function<Option, String> deprecatedFormatFunc = DEFAULT_DEPRECATED_FORMAT;</span>
/**
* The output PrintWriter, defaults to wrapping {@link System#out}.
*/
-<span class="nc" id="L91"> private PrintWriter printStream = createDefaultPrintWriter();</span>
+<span class="fc" id="L91"> private PrintWriter printStream = createDefaultPrintWriter();</span>
@Override
public HelpFormatter get() {
-<span class="nc" id="L95"> return new HelpFormatter(deprecatedFormatFunc, printStream);</span>
+<span class="fc" id="L95"> return new HelpFormatter(deprecatedFormatFunc, printStream);</span>
}
/**
* Sets the output PrintWriter, defaults to wrapping {@link System#out}.
*
* @param printWriter the output PrintWriter, not null.
- * @return this.
+ * @return {@code this} instance.
*/
public Builder setPrintWriter(final PrintWriter printWriter) {
-<span class="nc" id="L105"> this.printStream = Objects.requireNonNull(printWriter, "printWriter");</span>
-<span class="nc" id="L106"> return this;</span>
+<span class="fc" id="L105"> this.printStream = Objects.requireNonNull(printWriter, "printWriter");</span>
+<span class="fc" id="L106"> return this;</span>
}
/**
* Sets whether to show deprecated options.
*
* @param useDefaultFormat if {@code true} use the default format, otherwise clear the formatter.
- * @return this.
+ * @return {@code this} instance.
*/
public Builder setShowDeprecated(final boolean useDefaultFormat) {
-<span class="nc bnc" id="L116" title="All 2 branches missed."> return setShowDeprecated(useDefaultFormat ? DEFAULT_DEPRECATED_FORMAT : null);</span>
+<span class="fc bfc" id="L116" title="All 2 branches covered."> return setShowDeprecated(useDefaultFormat ? DEFAULT_DEPRECATED_FORMAT : null);</span>
}
/**
* Sets whether to show deprecated options.
*
* @param showDeprecatedFunc Specify the format for the deprecated options.
- * @return this.
+ * @return {@code this} instance.
* @since 1.8.0
*/
public Builder setShowDeprecated(final Function<Option, String> showDeprecatedFunc) {
-<span class="nc" id="L127"> this.deprecatedFormatFunc = showDeprecatedFunc;</span>
-<span class="nc" id="L128"> return this;</span>
+<span class="fc" id="L127"> this.deprecatedFormatFunc = showDeprecatedFunc;</span>
+<span class="fc" id="L128"> return this;</span>
}
}
@@ -148,7 +148,7 @@ public class HelpFormatter {
*/
@Override
public int compare(final Option opt1, final Option opt2) {
-<span class="nc" id="L151"> return opt1.getKey().compareToIgnoreCase(opt2.getKey());</span>
+<span class="fc" id="L151"> return opt1.getKey().compareToIgnoreCase(opt2.getKey());</span>
}
}
/** Default number of characters per line */
@@ -186,11 +186,11 @@ public class HelpFormatter {
* @since 1.7.0
*/
public static Builder builder() {
-<span class="nc" id="L189"> return new Builder();</span>
+<span class="fc" id="L189"> return new Builder();</span>
}
private static PrintWriter createDefaultPrintWriter() {
-<span class="nc" id="L193"> return new PrintWriter(System.out);</span>
+<span class="fc" id="L193"> return new PrintWriter(System.out);</span>
}
/**
@@ -200,8 +200,8 @@ public class HelpFormatter {
* @since 1.8.0
*/
public static String getDescription(final Option option) {
-<span class="nc" id="L203"> final String desc = option.getDescription();</span>
-<span class="nc bnc" id="L204" title="All 2 branches missed."> return desc == null ? "" : desc;</span>
+<span class="fc" id="L203"> final String desc = option.getDescription();</span>
+<span class="fc bfc" id="L204" title="All 2 branches covered."> return desc == null ? "" : desc;</span>
}
/**
@@ -209,71 +209,71 @@ public class HelpFormatter {
*
* @deprecated Scope will be made private for next major version - use get/setWidth methods instead.
*/
- @Deprecated
-<span class="nc" id="L213"> public int defaultWidth = DEFAULT_WIDTH;</span>
+<span class="fc" id="L212"> @Deprecated</span>
+ public int defaultWidth = DEFAULT_WIDTH;
/**
* Amount of padding to the left of each line
*
* @deprecated Scope will be made private for next major version - use get/setLeftPadding methods instead.
*/
- @Deprecated
-<span class="nc" id="L221"> public int defaultLeftPad = DEFAULT_LEFT_PAD;</span>
+<span class="fc" id="L220"> @Deprecated</span>
+ public int defaultLeftPad = DEFAULT_LEFT_PAD;
/**
* The number of characters of padding to be prefixed to each description line
*
* @deprecated Scope will be made private for next major version - use get/setDescPadding methods instead.
*/
- @Deprecated
-<span class="nc" id="L229"> public int defaultDescPad = DEFAULT_DESC_PAD;</span>
+<span class="fc" id="L228"> @Deprecated</span>
+ public int defaultDescPad = DEFAULT_DESC_PAD;
/**
* The string to display at the beginning of the usage statement
*
* @deprecated Scope will be made private for next major version - use get/setSyntaxPrefix methods instead.
*/
- @Deprecated
-<span class="nc" id="L237"> public String defaultSyntaxPrefix = DEFAULT_SYNTAX_PREFIX;</span>
+<span class="fc" id="L236"> @Deprecated</span>
+ public String defaultSyntaxPrefix = DEFAULT_SYNTAX_PREFIX;
/**
* The new line string
*
* @deprecated Scope will be made private for next major version - use get/setNewLine methods instead.
*/
- @Deprecated
-<span class="nc" id="L245"> public String defaultNewLine = System.lineSeparator();</span>
+<span class="fc" id="L244"> @Deprecated</span>
+<span class="fc" id="L245"> public String defaultNewLine = System.lineSeparator();</span>
/**
* The shortOpt prefix
*
* @deprecated Scope will be made private for next major version - use get/setOptPrefix methods instead.
*/
- @Deprecated
-<span class="nc" id="L253"> public String defaultOptPrefix = DEFAULT_OPT_PREFIX;</span>
+<span class="fc" id="L252"> @Deprecated</span>
+ public String defaultOptPrefix = DEFAULT_OPT_PREFIX;
/**
* The long Opt prefix
*
* @deprecated Scope will be made private for next major version - use get/setLongOptPrefix methods instead.
*/
- @Deprecated
-<span class="nc" id="L261"> public String defaultLongOptPrefix = DEFAULT_LONG_OPT_PREFIX;</span>
+<span class="fc" id="L260"> @Deprecated</span>
+ public String defaultLongOptPrefix = DEFAULT_LONG_OPT_PREFIX;
/**
* The name of the argument
*
* @deprecated Scope will be made private for next major version - use get/setArgName methods instead.
*/
- @Deprecated
-<span class="nc" id="L269"> public String defaultArgName = DEFAULT_ARG_NAME;</span>
+<span class="fc" id="L268"> @Deprecated</span>
+ public String defaultArgName = DEFAULT_ARG_NAME;
/**
* Comparator used to sort the options when they output in help text
*
* Defaults to case-insensitive alphabetical sorting by option key
*/
-<span class="nc" id="L276"> protected Comparator<Option> optionComparator = new OptionComparator();</span>
+<span class="fc" id="L276"> protected Comparator<Option> optionComparator = new OptionComparator();</span>
/**
* Function to format the description for a deprecated option.
@@ -288,25 +288,25 @@ public class HelpFormatter {
/**
* The separator displayed between the long option and its value.
*/
-<span class="nc" id="L291"> private String longOptSeparator = DEFAULT_LONG_OPT_SEPARATOR;</span>
+<span class="fc" id="L291"> private String longOptSeparator = DEFAULT_LONG_OPT_SEPARATOR;</span>
/**
* Constructs a new instance.
*/
public HelpFormatter() {
-<span class="nc" id="L297"> this(null, createDefaultPrintWriter());</span>
-<span class="nc" id="L298"> }</span>
+<span class="fc" id="L297"> this(null, createDefaultPrintWriter());</span>
+<span class="fc" id="L298"> }</span>
/**
* Constructs a new instance.
* @param printStream TODO
*/
-<span class="nc" id="L304"> private HelpFormatter(final Function<Option, String> deprecatedFormatFunc, final PrintWriter printStream) {</span>
+<span class="fc" id="L304"> private HelpFormatter(final Function<Option, String> deprecatedFormatFunc, final PrintWriter printStream) {</span>
// TODO All other instance HelpFormatter instance variables.
// Make HelpFormatter immutable for 2.0
-<span class="nc" id="L307"> this.deprecatedFormatFunc = deprecatedFormatFunc;</span>
-<span class="nc" id="L308"> this.printWriter = printStream;</span>
-<span class="nc" id="L309"> }</span>
+<span class="fc" id="L307"> this.deprecatedFormatFunc = deprecatedFormatFunc;</span>
+<span class="fc" id="L308"> this.printWriter = printStream;</span>
+<span class="fc" id="L309"> }</span>
/**
* Appends the usage clause for an Option to a StringBuffer.
@@ -316,24 +316,24 @@ public class HelpFormatter {
* @param required whether the Option is required or not
*/
private void appendOption(final StringBuffer buff, final Option option, final boolean required) {
-<span class="nc bnc" id="L319" title="All 2 branches missed."> if (!required) {</span>
-<span class="nc" id="L320"> buff.append("[");</span>
+<span class="fc bfc" id="L319" title="All 2 branches covered."> if (!required) {</span>
+<span class="fc" id="L320"> buff.append("[");</span>
}
-<span class="nc bnc" id="L322" title="All 2 branches missed."> if (option.getOpt() != null) {</span>
-<span class="nc" id="L323"> buff.append("-").append(option.getOpt());</span>
-<span class="nc" id="L324"> } else {</span>
-<span class="nc" id="L325"> buff.append("--").append(option.getLongOpt());</span>
+<span class="fc bfc" id="L322" title="All 2 branches covered."> if (option.getOpt() != null) {</span>
+<span class="fc" id="L323"> buff.append("-").append(option.getOpt());</span>
+ } else {
+<span class="fc" id="L325"> buff.append("--").append(option.getLongOpt());</span>
}
// if the Option has a value and a non blank argname
-<span class="nc bnc" id="L328" title="All 6 branches missed."> if (option.hasArg() && (option.getArgName() == null || !option.getArgName().isEmpty())) {</span>
-<span class="nc bnc" id="L329" title="All 2 branches missed."> buff.append(option.getOpt() == null ? longOptSeparator : " ");</span>
-<span class="nc bnc" id="L330" title="All 2 branches missed."> buff.append("<").append(option.getArgName() != null ? option.getArgName() : getArgName()).append(">");</span>
+<span class="fc bfc" id="L328" title="All 6 branches covered."> if (option.hasArg() && (option.getArgName() == null || !option.getArgName().isEmpty())) {</span>
+<span class="fc bfc" id="L329" title="All 2 branches covered."> buff.append(option.getOpt() == null ? longOptSeparator : " ");</span>
+<span class="fc bfc" id="L330" title="All 2 branches covered."> buff.append("<").append(option.getArgName() != null ? option.getArgName() : getArgName()).append(">");</span>
}
// if the Option is not a required option
-<span class="nc bnc" id="L333" title="All 2 branches missed."> if (!required) {</span>
-<span class="nc" id="L334"> buff.append("]");</span>
+<span class="fc bfc" id="L333" title="All 2 branches covered."> if (!required) {</span>
+<span class="fc" id="L334"> buff.append("]");</span>
}
-<span class="nc" id="L336"> }</span>
+<span class="fc" id="L336"> }</span>
/**
* Appends the usage clause for an OptionGroup to a StringBuffer. The clause is wrapped in square brackets if the group
@@ -344,28 +344,28 @@ public class HelpFormatter {
* @see #appendOption(StringBuffer,Option,boolean)
*/
private void appendOptionGroup(final StringBuffer buff, final OptionGroup group) {
-<span class="nc bnc" id="L347" title="All 2 branches missed."> if (!group.isRequired()) {</span>
-<span class="nc" id="L348"> buff.append("[");</span>
+<span class="fc bfc" id="L347" title="All 2 branches covered."> if (!group.isRequired()) {</span>
+<span class="fc" id="L348"> buff.append("[");</span>
}
-<span class="nc" id="L351"> final List<Option> optList = new ArrayList<>(group.getOptions());</span>
-<span class="nc bnc" id="L352" title="All 2 branches missed."> if (getOptionComparator() != null) {</span>
-<span class="nc" id="L353"> Collections.sort(optList, getOptionComparator());</span>
+<span class="fc" id="L351"> final List<Option> optList = new ArrayList<>(group.getOptions());</span>
+<span class="pc bpc" id="L352" title="1 of 2 branches missed."> if (getOptionComparator() != null) {</span>
+<span class="fc" id="L353"> Collections.sort(optList, getOptionComparator());</span>
}
// for each option in the OptionGroup
-<span class="nc bnc" id="L356" title="All 2 branches missed."> for (final Iterator<Option> it = optList.iterator(); it.hasNext();) {</span>
+<span class="fc bfc" id="L356" title="All 2 branches covered."> for (final Iterator<Option> it = optList.iterator(); it.hasNext();) {</span>
// whether the option is required or not is handled at group level
-<span class="nc" id="L358"> appendOption(buff, it.next(), true);</span>
+<span class="fc" id="L358"> appendOption(buff, it.next(), true);</span>
-<span class="nc bnc" id="L360" title="All 2 branches missed."> if (it.hasNext()) {</span>
-<span class="nc" id="L361"> buff.append(" | ");</span>
+<span class="fc bfc" id="L360" title="All 2 branches covered."> if (it.hasNext()) {</span>
+<span class="fc" id="L361"> buff.append(" | ");</span>
}
}
-<span class="nc bnc" id="L365" title="All 2 branches missed."> if (!group.isRequired()) {</span>
-<span class="nc" id="L366"> buff.append("]");</span>
+<span class="fc bfc" id="L365" title="All 2 branches covered."> if (!group.isRequired()) {</span>
+<span class="fc" id="L366"> buff.append("]");</span>
}
-<span class="nc" id="L368"> }</span>
+<span class="fc" id="L368"> }</span>
/**
* Creates a String of padding of length {@code len}.
@@ -375,9 +375,9 @@ public class HelpFormatter {
* @return The String of padding
*/
protected String createPadding(final int len) {
-<span class="nc" id="L378"> final char[] padding = new char[len];</span>
-<span class="nc" id="L379"> Arrays.fill(padding, ' ');</span>
-<span class="nc" id="L380"> return new String(padding);</span>
+<span class="fc" id="L378"> final char[] padding = new char[len];</span>
+<span class="fc" id="L379"> Arrays.fill(padding, ' ');</span>
+<span class="fc" id="L380"> return new String(padding);</span>
}
/**
@@ -392,32 +392,32 @@ public class HelpFormatter {
*/
protected int findWrapPos(final String text, final int width, final int startPos) {
// the line ends before the max wrap pos or a new line char found
-<span class="nc" id="L395"> int pos = text.indexOf(Char.LF, startPos);</span>
-<span class="nc bnc" id="L396" title="All 4 branches missed."> if (pos != -1 && pos <= width) {</span>
-<span class="nc" id="L397"> return pos + 1;</span>
- }
-<span class="nc" id="L399"> pos = text.indexOf(Char.TAB, startPos);</span>
-<span class="nc bnc" id="L400" title="All 4 branches missed."> if (pos != -1 && pos <= width) {</span>
-<span class="nc" id="L401"> return pos + 1;</span>
+<span class="fc" id="L395"> int pos = text.indexOf(Char.LF, startPos);</span>
+<span class="fc bfc" id="L396" title="All 4 branches covered."> if (pos != -1 && pos <= width) {</span>
+<span class="fc" id="L397"> return pos + 1;</span>
+ }
+<span class="fc" id="L399"> pos = text.indexOf(Char.TAB, startPos);</span>
+<span class="pc bpc" id="L400" title="1 of 4 branches missed."> if (pos != -1 && pos <= width) {</span>
+<span class="fc" id="L401"> return pos + 1;</span>
}
-<span class="nc bnc" id="L403" title="All 2 branches missed."> if (startPos + width >= text.length()) {</span>
-<span class="nc" id="L404"> return -1;</span>
+<span class="fc bfc" id="L403" title="All 2 branches covered."> if (startPos + width >= text.length()) {</span>
+<span class="fc" id="L404"> return -1;</span>
}
// look for the last whitespace character before startPos+width
-<span class="nc bnc" id="L407" title="All 2 branches missed."> for (pos = startPos + width; pos >= startPos; --pos) {</span>
-<span class="nc" id="L408"> final char c = text.charAt(pos);</span>
-<span class="nc bnc" id="L409" title="All 6 branches missed."> if (c == Char.SP || c == Char.LF || c == Char.CR) {</span>
+<span class="fc bfc" id="L407" title="All 2 branches covered."> for (pos = startPos + width; pos >= startPos; --pos) {</span>
+<span class="fc" id="L408"> final char c = text.charAt(pos);</span>
+<span class="pc bpc" id="L409" title="2 of 6 branches missed."> if (c == Char.SP || c == Char.LF || c == Char.CR) {</span>
<span class="nc" id="L410"> break;</span>
}
}
// if we found it - just return
-<span class="nc bnc" id="L414" title="All 2 branches missed."> if (pos > startPos) {</span>
-<span class="nc" id="L415"> return pos;</span>
+<span class="fc bfc" id="L414" title="All 2 branches covered."> if (pos > startPos) {</span>
+<span class="fc" id="L415"> return pos;</span>
}
// if we didn't find one, simply chop at startPos+width
-<span class="nc" id="L418"> pos = startPos + width;</span>
+<span class="fc" id="L418"> pos = startPos + width;</span>
-<span class="nc bnc" id="L420" title="All 2 branches missed."> return pos == text.length() ? -1 : pos;</span>
+<span class="pc bpc" id="L420" title="1 of 2 branches missed."> return pos == text.length() ? -1 : pos;</span>
}
/**
@@ -426,7 +426,7 @@ public class HelpFormatter {
* @return the 'argName'
*/
public String getArgName() {
-<span class="nc" id="L429"> return defaultArgName;</span>
+<span class="fc" id="L429"> return defaultArgName;</span>
}
/**
@@ -435,7 +435,7 @@ public class HelpFormatter {
* @return the 'descPadding'
*/
public int getDescPadding() {
-<span class="nc" id="L438"> return defaultDescPad;</span>
+<span class="fc" id="L438"> return defaultDescPad;</span>
}
/**
@@ -444,7 +444,7 @@ public class HelpFormatter {
* @return the 'leftPadding'
*/
public int getLeftPadding() {
-<span class="nc" id="L447"> return defaultLeftPad;</span>
+<span class="fc" id="L447"> return defaultLeftPad;</span>
}
/**
@@ -453,7 +453,7 @@ public class HelpFormatter {
* @return the 'longOptPrefix'
*/
public String getLongOptPrefix() {
-<span class="nc" id="L456"> return defaultLongOptPrefix;</span>
+<span class="fc" id="L456"> return defaultLongOptPrefix;</span>
}
/**
@@ -463,7 +463,7 @@ public class HelpFormatter {
* @since 1.3
*/
public String getLongOptSeparator() {
-<span class="nc" id="L466"> return longOptSeparator;</span>
+<span class="fc" id="L466"> return longOptSeparator;</span>
}
/**
@@ -472,7 +472,7 @@ public class HelpFormatter {
* @return the 'newLine'
*/
public String getNewLine() {
-<span class="nc" id="L475"> return defaultNewLine;</span>
+<span class="fc" id="L475"> return defaultNewLine;</span>
}
/**
@@ -483,7 +483,7 @@ public class HelpFormatter {
* @since 1.2
*/
public Comparator<Option> getOptionComparator() {
-<span class="nc" id="L486"> return optionComparator;</span>
+<span class="fc" id="L486"> return optionComparator;</span>
}
/**
@@ -492,7 +492,7 @@ public class HelpFormatter {
* @return the 'optPrefix'
*/
public String getOptPrefix() {
-<span class="nc" id="L495"> return defaultOptPrefix;</span>
+<span class="fc" id="L495"> return defaultOptPrefix;</span>
}
/**
@@ -501,7 +501,7 @@ public class HelpFormatter {
* @return the 'syntaxPrefix'
*/
public String getSyntaxPrefix() {
-<span class="nc" id="L504"> return defaultSyntaxPrefix;</span>
+<span class="fc" id="L504"> return defaultSyntaxPrefix;</span>
}
/**
@@ -510,7 +510,7 @@ public class HelpFormatter {
* @return the 'width'
*/
public int getWidth() {
-<span class="nc" id="L513"> return defaultWidth;</span>
+<span class="fc" id="L513"> return defaultWidth;</span>
}
/**
@@ -524,8 +524,8 @@ public class HelpFormatter {
* @param footer the banner to display at the end of the help
*/
public void printHelp(final int width, final String cmdLineSyntax, final String header, final Options options, final String footer) {
-<span class="nc" id="L527"> printHelp(width, cmdLineSyntax, header, options, footer, false);</span>
-<span class="nc" id="L528"> }</span>
+<span class="fc" id="L527"> printHelp(width, cmdLineSyntax, header, options, footer, false);</span>
+<span class="fc" id="L528"> }</span>
/**
* Prints the help for {@code options} with the specified command line syntax. This method prints help information
@@ -540,10 +540,10 @@ public class HelpFormatter {
*/
public void printHelp(final int width, final String cmdLineSyntax, final String header, final Options options, final String footer,
final boolean autoUsage) {
-<span class="nc" id="L543"> final PrintWriter pw = new PrintWriter(printWriter);</span>
-<span class="nc" id="L544"> printHelp(pw, width, cmdLineSyntax, header, options, getLeftPadding(), getDescPadding(), footer, autoUsage);</span>
-<span class="nc" id="L545"> pw.flush();</span>
-<span class="nc" id="L546"> }</span>
+<span class="fc" id="L543"> final PrintWriter pw = new PrintWriter(printWriter);</span>
+<span class="fc" id="L544"> printHelp(pw, width, cmdLineSyntax, header, options, getLeftPadding(), getDescPadding(), footer, autoUsage);</span>
+<span class="fc" id="L545"> pw.flush();</span>
+<span class="fc" id="L546"> }</span>
/**
* Prints the help for {@code options} with the specified command line syntax.
@@ -561,8 +561,8 @@ public class HelpFormatter {
*/
public void printHelp(final PrintWriter pw, final int width, final String cmdLineSyntax, final String header, final Options options, final int leftPad,
final int descPad, final String footer) {
-<span class="nc" id="L564"> printHelp(pw, width, cmdLineSyntax, header, options, leftPad, descPad, footer, false);</span>
-<span class="nc" id="L565"> }</span>
+<span class="fc" id="L564"> printHelp(pw, width, cmdLineSyntax, header, options, leftPad, descPad, footer, false);</span>
+<span class="fc" id="L565"> }</span>
/**
* Prints the help for {@code options} with the specified command line syntax.
@@ -580,22 +580,22 @@ public class HelpFormatter {
*/
public void printHelp(final PrintWriter pw, final int width, final String cmdLineSyntax, final String header, final Options options, final int leftPad,
final int descPad, final String footer, final boolean autoUsage) {
-<span class="nc bnc" id="L583" title="All 2 branches missed."> if (Util.isEmpty(cmdLineSyntax)) {</span>
-<span class="nc" id="L584"> throw new IllegalArgumentException("cmdLineSyntax not provided");</span>
+<span class="fc bfc" id="L583" title="All 2 branches covered."> if (Util.isEmpty(cmdLineSyntax)) {</span>
+<span class="fc" id="L584"> throw new IllegalArgumentException("cmdLineSyntax not provided");</span>
}
-<span class="nc bnc" id="L586" title="All 2 branches missed."> if (autoUsage) {</span>
-<span class="nc" id="L587"> printUsage(pw, width, cmdLineSyntax, options);</span>
-<span class="nc" id="L588"> } else {</span>
-<span class="nc" id="L589"> printUsage(pw, width, cmdLineSyntax);</span>
- }
-<span class="nc bnc" id="L591" title="All 4 branches missed."> if (header != null && !header.isEmpty()) {</span>
-<span class="nc" id="L592"> printWrapped(pw, width, header);</span>
- }
-<span class="nc" id="L594"> printOptions(pw, width, options, leftPad, descPad);</span>
-<span class="nc bnc" id="L595" title="All 4 branches missed."> if (footer != null && !footer.isEmpty()) {</span>
-<span class="nc" id="L596"> printWrapped(pw, width, footer);</span>
+<span class="fc bfc" id="L586" title="All 2 branches covered."> if (autoUsage) {</span>
+<span class="fc" id="L587"> printUsage(pw, width, cmdLineSyntax, options);</span>
+ } else {
+<span class="fc" id="L589"> printUsage(pw, width, cmdLineSyntax);</span>
+ }
+<span class="fc bfc" id="L591" title="All 4 branches covered."> if (header != null && !header.isEmpty()) {</span>
+<span class="fc" id="L592"> printWrapped(pw, width, header);</span>
+ }
+<span class="fc" id="L594"> printOptions(pw, width, options, leftPad, descPad);</span>
+<span class="fc bfc" id="L595" title="All 4 branches covered."> if (footer != null && !footer.isEmpty()) {</span>
+<span class="fc" id="L596"> printWrapped(pw, width, footer);</span>
}
-<span class="nc" id="L598"> }</span>
+<span class="fc" id="L598"> }</span>
/**
* Prints the help for {@code options} with the specified command line syntax. This method prints help information
@@ -605,8 +605,8 @@ public class HelpFormatter {
* @param options the Options instance
*/
public void printHelp(final String cmdLineSyntax, final Options options) {
-<span class="nc" id="L608"> printHelp(getWidth(), cmdLineSyntax, null, options, null, false);</span>
-<span class="nc" id="L609"> }</span>
+<span class="fc" id="L608"> printHelp(getWidth(), cmdLineSyntax, null, options, null, false);</span>
+<span class="fc" id="L609"> }</span>
/**
* Prints the help for {@code options} with the specified command line syntax. This method prints help information
@@ -617,8 +617,8 @@ public class HelpFormatter {
* @param autoUsage whether to print an automatically generated usage statement
*/
public void printHelp(final String cmdLineSyntax, final Options options, final boolean autoUsage) {
-<span class="nc" id="L620"> printHelp(getWidth(), cmdLineSyntax, null, options, null, autoUsage);</span>
-<span class="nc" id="L621"> }</span>
+<span class="fc" id="L620"> printHelp(getWidth(), cmdLineSyntax, null, options, null, autoUsage);</span>
+<span class="fc" id="L621"> }</span>
/**
* Prints the help for {@code options} with the specified command line syntax. This method prints help information
@@ -630,8 +630,8 @@ public class HelpFormatter {
* @param footer the banner to display at the end of the help
*/
public void printHelp(final String cmdLineSyntax, final String header, final Options options, final String footer) {
-<span class="nc" id="L633"> printHelp(cmdLineSyntax, header, options, footer, false);</span>
-<span class="nc" id="L634"> }</span>
+<span class="fc" id="L633"> printHelp(cmdLineSyntax, header, options, footer, false);</span>
+<span class="fc" id="L634"> }</span>
/**
* Prints the help for {@code options} with the specified command line syntax. This method prints help information
@@ -644,8 +644,8 @@ public class HelpFormatter {
* @param autoUsage whether to print an automatically generated usage statement
*/
public void printHelp(final String cmdLineSyntax, final String header, final Options options, final String footer, final boolean autoUsage) {
-<span class="nc" id="L647"> printHelp(getWidth(), cmdLineSyntax, header, options, footer, autoUsage);</span>
-<span class="nc" id="L648"> }</span>
+<span class="fc" id="L647"> printHelp(getWidth(), cmdLineSyntax, header, options, footer, autoUsage);</span>
+<span class="fc" id="L648"> }</span>
/**
* Prints the help for the specified Options to the specified writer, using the specified width, left padding and
@@ -658,10 +658,10 @@ public class HelpFormatter {
* @param descPad the number of characters of padding to be prefixed to each description line
*/
public void printOptions(final PrintWriter pw, final int width, final Options options, final int leftPad, final int descPad) {
-<span class="nc" id="L661"> final StringBuffer sb = new StringBuffer();</span>
-<span class="nc" id="L662"> renderOptions(sb, width, options, leftPad, descPad);</span>
-<span class="nc" id="L663"> pw.println(sb.toString());</span>
-<span class="nc" id="L664"> }</span>
+<span class="fc" id="L661"> final StringBuffer sb = new StringBuffer();</span>
+<span class="fc" id="L662"> renderOptions(sb, width, options, leftPad, descPad);</span>
+<span class="fc" id="L663"> pw.println(sb.toString());</span>
+<span class="fc" id="L664"> }</span>
/**
* Prints the cmdLineSyntax to the specified writer, using the specified width.
@@ -671,9 +671,9 @@ public class HelpFormatter {
* @param cmdLineSyntax The usage statement.
*/
public void printUsage(final PrintWriter pw, final int width, final String cmdLineSyntax) {
-<span class="nc" id="L674"> final int argPos = cmdLineSyntax.indexOf(' ') + 1;</span>
-<span class="nc" id="L675"> printWrapped(pw, width, getSyntaxPrefix().length() + argPos, getSyntaxPrefix() + cmdLineSyntax);</span>
-<span class="nc" id="L676"> }</span>
+<span class="fc" id="L674"> final int argPos = cmdLineSyntax.indexOf(' ') + 1;</span>
+<span class="fc" id="L675"> printWrapped(pw, width, getSyntaxPrefix().length() + argPos, getSyntaxPrefix() + cmdLineSyntax);</span>
+<span class="fc" id="L676"> }</span>
/**
* Prints the usage statement for the specified application.
@@ -685,43 +685,43 @@ public class HelpFormatter {
*/
public void printUsage(final PrintWriter pw, final int width, final String app, final Options options) {
// initialize the string buffer
-<span class="nc" id="L688"> final StringBuffer buff = new StringBuffer(getSyntaxPrefix()).append(app).append(Char.SP);</span>
+<span class="fc" id="L688"> final StringBuffer buff = new StringBuffer(getSyntaxPrefix()).append(app).append(Char.SP);</span>
// create a list for processed option groups
-<span class="nc" id="L690"> final Collection<OptionGroup> processedGroups = new ArrayList<>();</span>
-<span class="nc" id="L691"> final List<Option> optList = new ArrayList<>(options.getOptions());</span>
-<span class="nc bnc" id="L692" title="All 2 branches missed."> if (getOptionComparator() != null) {</span>
-<span class="nc" id="L693"> Collections.sort(optList, getOptionComparator());</span>
+<span class="fc" id="L690"> final Collection<OptionGroup> processedGroups = new ArrayList<>();</span>
+<span class="fc" id="L691"> final List<Option> optList = new ArrayList<>(options.getOptions());</span>
+<span class="fc bfc" id="L692" title="All 2 branches covered."> if (getOptionComparator() != null) {</span>
+<span class="fc" id="L693"> Collections.sort(optList, getOptionComparator());</span>
}
// iterate over the options
-<span class="nc bnc" id="L696" title="All 2 branches missed."> for (final Iterator<Option> it = optList.iterator(); it.hasNext();) {</span>
+<span class="fc bfc" id="L696" title="All 2 branches covered."> for (final Iterator<Option> it = optList.iterator(); it.hasNext();) {</span>
// get the next Option
-<span class="nc" id="L698"> final Option option = it.next();</span>
+<span class="fc" id="L698"> final Option option = it.next();</span>
// check if the option is part of an OptionGroup
-<span class="nc" id="L700"> final OptionGroup group = options.getOptionGroup(option);</span>
+<span class="fc" id="L700"> final OptionGroup group = options.getOptionGroup(option);</span>
// if the option is part of a group
-<span class="nc bnc" id="L702" title="All 2 branches missed."> if (group != null) {</span>
+<span class="fc bfc" id="L702" title="All 2 branches covered."> if (group != null) {</span>
// and if the group has not already been processed
-<span class="nc bnc" id="L704" title="All 2 branches missed."> if (!processedGroups.contains(group)) {</span>
+<span class="fc bfc" id="L704" title="All 2 branches covered."> if (!processedGroups.contains(group)) {</span>
// add the group to the processed list
-<span class="nc" id="L706"> processedGroups.add(group);</span>
+<span class="fc" id="L706"> processedGroups.add(group);</span>
// add the usage clause
-<span class="nc" id="L708"> appendOptionGroup(buff, group);</span>
+<span class="fc" id="L708"> appendOptionGroup(buff, group);</span>
}
// otherwise the option was displayed in the group
// previously so ignore it.
-<span class="nc" id="L712"> }</span>
+ }
// if the Option is not part of an OptionGroup
else {
-<span class="nc" id="L715"> appendOption(buff, option, option.isRequired());</span>
+<span class="fc" id="L715"> appendOption(buff, option, option.isRequired());</span>
}
-<span class="nc bnc" id="L717" title="All 2 branches missed."> if (it.hasNext()) {</span>
-<span class="nc" id="L718"> buff.append(Char.SP);</span>
+<span class="fc bfc" id="L717" title="All 2 branches covered."> if (it.hasNext()) {</span>
+<span class="fc" id="L718"> buff.append(Char.SP);</span>
}
- }
+<span class="fc" id="L720"> }</span>
// call printWrapped
-<span class="nc" id="L723"> printWrapped(pw, width, buff.toString().indexOf(' ') + 1, buff.toString());</span>
-<span class="nc" id="L724"> }</span>
+<span class="fc" id="L723"> printWrapped(pw, width, buff.toString().indexOf(' ') + 1, buff.toString());</span>
+<span class="fc" id="L724"> }</span>
/**
* Prints the specified text to the specified PrintWriter.
@@ -732,10 +732,10 @@ public class HelpFormatter {
* @param text The text to be written to the PrintWriter
*/
public void printWrapped(final PrintWriter pw, final int width, final int nextLineTabStop, final String text) {
-<span class="nc" id="L735"> final StringBuffer sb = new StringBuffer(text.length());</span>
-<span class="nc" id="L736"> renderWrappedTextBlock(sb, width, nextLineTabStop, text);</span>
-<span class="nc" id="L737"> pw.println(sb.toString());</span>
-<span class="nc" id="L738"> }</span>
+<span class="fc" id="L735"> final StringBuffer sb = new StringBuffer(text.length());</span>
+<span class="fc" id="L736"> renderWrappedTextBlock(sb, width, nextLineTabStop, text);</span>
+<span class="fc" id="L737"> pw.println(sb.toString());</span>
+<span class="fc" id="L738"> }</span>
/**
* Prints the specified text to the specified PrintWriter.
@@ -745,8 +745,8 @@ public class HelpFormatter {
* @param text The text to be written to the PrintWriter
*/
public void printWrapped(final PrintWriter pw, final int width, final String text) {
-<span class="nc" id="L748"> printWrapped(pw, width, 0, text);</span>
-<span class="nc" id="L749"> }</span>
+<span class="fc" id="L748"> printWrapped(pw, width, 0, text);</span>
+<span class="fc" id="L749"> }</span>
/**
* Renders the specified Options and return the rendered Options in a StringBuffer.
@@ -760,61 +760,61 @@ public class HelpFormatter {
* @return the StringBuffer with the rendered Options contents.
*/
protected StringBuffer renderOptions(final StringBuffer sb, final int width, final Options options, final int leftPad, final int descPad) {
-<span class="nc" id="L763"> final String lpad = createPadding(leftPad);</span>
-<span class="nc" id="L764"> final String dpad = createPadding(descPad);</span>
+<span class="fc" id="L763"> final String lpad = createPadding(leftPad);</span>
+<span class="fc" id="L764"> final String dpad = createPadding(descPad);</span>
// first create list containing only <lpad>-a,--aaa where
// -a is opt and --aaa is long opt; in parallel look for
// the longest opt string this list will be then used to
// sort options ascending
-<span class="nc" id="L769"> int max = 0;</span>
-<span class="nc" id="L770"> final List<StringBuffer> prefixList = new ArrayList<>();</span>
-<span class="nc" id="L771"> final List<Option> optList = options.helpOptions();</span>
-<span class="nc bnc" id="L772" title="All 2 branches missed."> if (getOptionComparator() != null) {</span>
-<span class="nc" id="L773"> Collections.sort(optList, getOptionComparator());</span>
- }
-<span class="nc bnc" id="L775" title="All 2 branches missed."> for (final Option option : optList) {</span>
-<span class="nc" id="L776"> final StringBuffer optBuf = new StringBuffer();</span>
-<span class="nc bnc" id="L777" title="All 2 branches missed."> if (option.getOpt() == null) {</span>
-<span class="nc" id="L778"> optBuf.append(lpad).append(" ").append(getLongOptPrefix()).append(option.getLongOpt());</span>
-<span class="nc" id="L779"> } else {</span>
-<span class="nc" id="L780"> optBuf.append(lpad).append(getOptPrefix()).append(option.getOpt());</span>
-<span class="nc bnc" id="L781" title="All 2 branches missed."> if (option.hasLongOpt()) {</span>
-<span class="nc" id="L782"> optBuf.append(',').append(getLongOptPrefix()).append(option.getLongOpt());</span>
+<span class="fc" id="L769"> int max = 0;</span>
+<span class="fc" id="L770"> final List<StringBuffer> prefixList = new ArrayList<>();</span>
+<span class="fc" id="L771"> final List<Option> optList = options.helpOptions();</span>
+<span class="pc bpc" id="L772" title="1 of 2 branches missed."> if (getOptionComparator() != null) {</span>
+<span class="fc" id="L773"> Collections.sort(optList, getOptionComparator());</span>
+ }
+<span class="fc bfc" id="L775" title="All 2 branches covered."> for (final Option option : optList) {</span>
+<span class="fc" id="L776"> final StringBuffer optBuf = new StringBuffer();</span>
+<span class="fc bfc" id="L777" title="All 2 branches covered."> if (option.getOpt() == null) {</span>
+<span class="fc" id="L778"> optBuf.append(lpad).append(" ").append(getLongOptPrefix()).append(option.getLongOpt());</span>
+ } else {
+<span class="fc" id="L780"> optBuf.append(lpad).append(getOptPrefix()).append(option.getOpt());</span>
+<span class="fc bfc" id="L781" title="All 2 branches covered."> if (option.hasLongOpt()) {</span>
+<span class="fc" id="L782"> optBuf.append(',').append(getLongOptPrefix()).append(option.getLongOpt());</span>
}
}
-<span class="nc bnc" id="L785" title="All 2 branches missed."> if (option.hasArg()) {</span>
-<span class="nc" id="L786"> final String argName = option.getArgName();</span>
-<span class="nc bnc" id="L787" title="All 4 branches missed."> if (argName != null && argName.isEmpty()) {</span>
+<span class="fc bfc" id="L785" title="All 2 branches covered."> if (option.hasArg()) {</span>
+<span class="fc" id="L786"> final String argName = option.getArgName();</span>
+<span class="pc bpc" id="L787" title="1 of 4 branches missed."> if (argName != null && argName.isEmpty()) {</span>
// if the option has a blank argname
<span class="nc" id="L789"> optBuf.append(' ');</span>
-<span class="nc" id="L790"> } else {</span>
-<span class="nc bnc" id="L791" title="All 2 branches missed."> optBuf.append(option.hasLongOpt() ? longOptSeparator : " ");</span>
-<span class="nc bnc" id="L792" title="All 2 branches missed."> optBuf.append("<").append(argName != null ? option.getArgName() : getArgName()).append(">");</span>
+ } else {
+<span class="fc bfc" id="L791" title="All 2 branches covered."> optBuf.append(option.hasLongOpt() ? longOptSeparator : " ");</span>
+<span class="fc bfc" id="L792" title="All 2 branches covered."> optBuf.append("<").append(argName != null ? option.getArgName() : getArgName()).append(">");</span>
}
}
-<span class="nc" id="L795"> prefixList.add(optBuf);</span>
-<span class="nc" id="L796"> max = Math.max(optBuf.length(), max);</span>
- }
-<span class="nc" id="L798"> int x = 0;</span>
-<span class="nc bnc" id="L799" title="All 2 branches missed."> for (final Iterator<Option> it = optList.iterator(); it.hasNext();) {</span>
-<span class="nc" id="L800"> final Option option = it.next();</span>
-<span class="nc" id="L801"> final StringBuilder optBuf = new StringBuilder(prefixList.get(x++).toString());</span>
-<span class="nc bnc" id="L802" title="All 2 branches missed."> if (optBuf.length() < max) {</span>
-<span class="nc" id="L803"> optBuf.append(createPadding(max - optBuf.length()));</span>
- }
-<span class="nc" id="L805"> optBuf.append(dpad);</span>
-<span class="nc" id="L806"> final int nextLineTabStop = max + descPad;</span>
-<span class="nc bnc" id="L807" title="All 4 branches missed."> if (deprecatedFormatFunc != null && option.isDeprecated()) {</span>
-<span class="nc" id="L808"> optBuf.append(deprecatedFormatFunc.apply(option).trim());</span>
-<span class="nc bnc" id="L809" title="All 2 branches missed."> } else if (option.getDescription() != null) {</span>
-<span class="nc" id="L810"> optBuf.append(option.getDescription());</span>
- }
-<span class="nc" id="L812"> renderWrappedText(sb, width, nextLineTabStop, optBuf.toString());</span>
-<span class="nc bnc" id="L813" title="All 2 branches missed."> if (it.hasNext()) {</span>
-<span class="nc" id="L814"> sb.append(getNewLine());</span>
+<span class="fc" id="L795"> prefixList.add(optBuf);</span>
+<span class="fc" id="L796"> max = Math.max(optBuf.length(), max);</span>
+<span class="fc" id="L797"> }</span>
+<span class="fc" id="L798"> int x = 0;</span>
+<span class="fc bfc" id="L799" title="All 2 branches covered."> for (final Iterator<Option> it = optList.iterator(); it.hasNext();) {</span>
+<span class="fc" id="L800"> final Option option = it.next();</span>
+<span class="fc" id="L801"> final StringBuilder optBuf = new StringBuilder(prefixList.get(x++).toString());</span>
+<span class="fc bfc" id="L802" title="All 2 branches covered."> if (optBuf.length() < max) {</span>
+<span class="fc" id="L803"> optBuf.append(createPadding(max - optBuf.length()));</span>
+ }
+<span class="fc" id="L805"> optBuf.append(dpad);</span>
+<span class="fc" id="L806"> final int nextLineTabStop = max + descPad;</span>
+<span class="fc bfc" id="L807" title="All 4 branches covered."> if (deprecatedFormatFunc != null && option.isDeprecated()) {</span>
+<span class="fc" id="L808"> optBuf.append(deprecatedFormatFunc.apply(option).trim());</span>
+<span class="fc bfc" id="L809" title="All 2 branches covered."> } else if (option.getDescription() != null) {</span>
+<span class="fc" id="L810"> optBuf.append(option.getDescription());</span>
+ }
+<span class="fc" id="L812"> renderWrappedText(sb, width, nextLineTabStop, optBuf.toString());</span>
+<span class="fc bfc" id="L813" title="All 2 branches covered."> if (it.hasNext()) {</span>
+<span class="fc" id="L814"> sb.append(getNewLine());</span>
}
- }
-<span class="nc" id="L817"> return sb;</span>
+<span class="fc" id="L816"> }</span>
+<span class="fc" id="L817"> return sb;</span>
}
/**
@@ -828,31 +828,31 @@ public class HelpFormatter {
* @return the StringBuffer with the rendered Options contents.
*/
protected StringBuffer renderWrappedText(final StringBuffer sb, final int width, final int nextLineTabStop, final String text) {
-<span class="nc" id="L831"> String render = text;</span>
-<span class="nc" id="L832"> int nextLineTabStopPos = nextLineTabStop;</span>
-<span class="nc" id="L833"> int pos = findWrapPos(render, width, 0);</span>
-<span class="nc bnc" id="L834" title="All 2 branches missed."> if (pos == -1) {</span>
-<span class="nc" id="L835"> sb.append(rtrim(render));</span>
-<span class="nc" id="L836"> return sb;</span>
+<span class="fc" id="L831"> String render = text;</span>
+<span class="fc" id="L832"> int nextLineTabStopPos = nextLineTabStop;</span>
+<span class="fc" id="L833"> int pos = findWrapPos(render, width, 0);</span>
+<span class="fc bfc" id="L834" title="All 2 branches covered."> if (pos == -1) {</span>
+<span class="fc" id="L835"> sb.append(rtrim(render));</span>
+<span class="fc" id="L836"> return sb;</span>
}
-<span class="nc" id="L838"> sb.append(rtrim(render.substring(0, pos))).append(getNewLine());</span>
-<span class="nc bnc" id="L839" title="All 2 branches missed."> if (nextLineTabStopPos >= width) {</span>
+<span class="fc" id="L838"> sb.append(rtrim(render.substring(0, pos))).append(getNewLine());</span>
+<span class="fc bfc" id="L839" title="All 2 branches covered."> if (nextLineTabStopPos >= width) {</span>
// stops infinite loop happening
-<span class="nc" id="L841"> nextLineTabStopPos = 1;</span>
+<span class="fc" id="L841"> nextLineTabStopPos = 1;</span>
}
// all following lines must be padded with nextLineTabStop space characters
-<span class="nc" id="L844"> final String padding = createPadding(nextLineTabStopPos);</span>
-<span class="nc" id="L845"> while (true) {</span>
-<span class="nc" id="L846"> render = padding + render.substring(pos).trim();</span>
-<span class="nc" id="L847"> pos = findWrapPos(render, width, 0);</span>
-<span class="nc bnc" id="L848" title="All 2 branches missed."> if (pos == -1) {</span>
-<span class="nc" id="L849"> sb.append(render);</span>
-<span class="nc" id="L850"> return sb;</span>
+<span class="fc" id="L844"> final String padding = createPadding(nextLineTabStopPos);</span>
+ while (true) {
+<span class="fc" id="L846"> render = padding + render.substring(pos).trim();</span>
+<span class="fc" id="L847"> pos = findWrapPos(render, width, 0);</span>
+<span class="fc bfc" id="L848" title="All 2 branches covered."> if (pos == -1) {</span>
+<span class="fc" id="L849"> sb.append(render);</span>
+<span class="fc" id="L850"> return sb;</span>
}
-<span class="nc bnc" id="L852" title="All 4 branches missed."> if (render.length() > width && pos == nextLineTabStopPos - 1) {</span>
-<span class="nc" id="L853"> pos = width;</span>
+<span class="fc bfc" id="L852" title="All 4 branches covered."> if (render.length() > width && pos == nextLineTabStopPos - 1) {</span>
+<span class="fc" id="L853"> pos = width;</span>
}
-<span class="nc" id="L855"> sb.append(rtrim(render.substring(0, pos))).append(getNewLine());</span>
+<span class="fc" id="L855"> sb.append(rtrim(render.substring(0, pos))).append(getNewLine());</span>
}
}
@@ -867,21 +867,21 @@ public class HelpFormatter {
*/
private Appendable renderWrappedTextBlock(final StringBuffer sb, final int width, final int nextLineTabStop, final String text) {
try {
-<span class="nc" id="L870"> final BufferedReader in = new BufferedReader(new StringReader(text));</span>
+<span class="fc" id="L870"> final BufferedReader in = new BufferedReader(new StringReader(text));</span>
String line;
-<span class="nc" id="L872"> boolean firstLine = true;</span>
-<span class="nc bnc" id="L873" title="All 2 branches missed."> while ((line = in.readLine()) != null) {</span>
-<span class="nc bnc" id="L874" title="All 2 branches missed."> if (!firstLine) {</span>
-<span class="nc" id="L875"> sb.append(getNewLine());</span>
-<span class="nc" id="L876"> } else {</span>
-<span class="nc" id="L877"> firstLine = false;</span>
+<span class="fc" id="L872"> boolean firstLine = true;</span>
+<span class="fc bfc" id="L873" title="All 2 branches covered."> while ((line = in.readLine()) != null) {</span>
+<span class="fc bfc" id="L874" title="All 2 branches covered."> if (!firstLine) {</span>
+<span class="fc" id="L875"> sb.append(getNewLine());</span>
+ } else {
+<span class="fc" id="L877"> firstLine = false;</span>
}
-<span class="nc" id="L879"> renderWrappedText(sb, width, nextLineTabStop, line);</span>
+<span class="fc" id="L879"> renderWrappedText(sb, width, nextLineTabStop, line);</span>
}
<span class="nc" id="L881"> } catch (final IOException e) { // NOPMD</span>
// cannot happen
- }
-<span class="nc" id="L884"> return sb;</span>
+<span class="fc" id="L883"> }</span>
+<span class="fc" id="L884"> return sb;</span>
}
/**
@@ -891,14 +891,14 @@ public class HelpFormatter {
* @return The String of without the trailing padding
*/
protected String rtrim(final String s) {
-<span class="nc bnc" id="L894" title="All 2 branches missed."> if (Util.isEmpty(s)) {</span>
-<span class="nc" id="L895"> return s;</span>
+<span class="fc bfc" id="L894" title="All 2 branches covered."> if (Util.isEmpty(s)) {</span>
+<span class="fc" id="L895"> return s;</span>
}
-<span class="nc" id="L897"> int pos = s.length();</span>
-<span class="nc bnc" id="L898" title="All 4 branches missed."> while (pos > 0 && Character.isWhitespace(s.charAt(pos - 1))) {</span>
-<span class="nc" id="L899"> --pos;</span>
+<span class="fc" id="L897"> int pos = s.length();</span>
+<span class="pc bpc" id="L898" title="1 of 4 branches missed."> while (pos > 0 && Character.isWhitespace(s.charAt(pos - 1))) {</span>
+<span class="fc" id="L899"> --pos;</span>
}
-<span class="nc" id="L901"> return s.substring(0, pos);</span>
+<span class="fc" id="L901"> return s.substring(0, pos);</span>
}
/**
@@ -907,8 +907,8 @@ public class HelpFormatter {
* @param name the new value of 'argName'
*/
public void setArgName(final String name) {
-<span class="nc" id="L910"> this.defaultArgName = name;</span>
-<span class="nc" id="L911"> }</span>
+<span class="fc" id="L910"> this.defaultArgName = name;</span>
+<span class="fc" id="L911"> }</span>
/**
* Sets the 'descPadding'.
@@ -916,8 +916,8 @@ public class HelpFormatter {
* @param padding the new value of 'descPadding'
*/
public void setDescPadding(final int padding) {
-<span class="nc" id="L919"> this.defaultDescPad = padding;</span>
-<span class="nc" id="L920"> }</span>
+<span class="fc" id="L919"> this.defaultDescPad = padding;</span>
+<span class="fc" id="L920"> }</span>
/**
* Sets the 'leftPadding'.
@@ -925,8 +925,8 @@ public class HelpFormatter {
* @param padding the new value of 'leftPadding'
*/
public void setLeftPadding(final int padding) {
-<span class="nc" id="L928"> this.defaultLeftPad = padding;</span>
-<span class="nc" id="L929"> }</span>
+<span class="fc" id="L928"> this.defaultLeftPad = padding;</span>
+<span class="fc" id="L929"> }</span>
/**
* Sets the 'longOptPrefix'.
@@ -934,8 +934,8 @@ public class HelpFormatter {
* @param prefix the new value of 'longOptPrefix'
*/
public void setLongOptPrefix(final String prefix) {
-<span class="nc" id="L937"> this.defaultLongOptPrefix = prefix;</span>
-<span class="nc" id="L938"> }</span>
+<span class="fc" id="L937"> this.defaultLongOptPrefix = prefix;</span>
+<span class="fc" id="L938"> }</span>
/**
* Sets the separator displayed between a long option and its value. Ensure that the separator specified is supported by
@@ -945,8 +945,8 @@ public class HelpFormatter {
* @since 1.3
*/
public void setLongOptSeparator(final String longOptSeparator) {
-<span class="nc" id="L948"> this.longOptSeparator = longOptSeparator;</span>
-<span class="nc" id="L949"> }</span>
+<span class="fc" id="L948"> this.longOptSeparator = longOptSeparator;</span>
+<span class="fc" id="L949"> }</span>
/**
* Sets the 'newLine'.
@@ -954,8 +954,8 @@ public class HelpFormatter {
* @param newline the new value of 'newLine'
*/
public void setNewLine(final String newline) {
-<span class="nc" id="L957"> this.defaultNewLine = newline;</span>
-<span class="nc" id="L958"> }</span>
+<span class="fc" id="L957"> this.defaultNewLine = newline;</span>
+<span class="fc" id="L958"> }</span>
/**
* Sets the comparator used to sort the options when they output in help text. Passing in a null comparator will keep the
@@ -965,8 +965,8 @@ public class HelpFormatter {
* @since 1.2
*/
public void setOptionComparator(final Comparator<Option> comparator) {
-<span class="nc" id="L968"> this.optionComparator = comparator;</span>
-<span class="nc" id="L969"> }</span>
+<span class="fc" id="L968"> this.optionComparator = comparator;</span>
+<span class="fc" id="L969"> }</span>
/**
* Sets the 'optPrefix'.
@@ -974,8 +974,8 @@ public class HelpFormatter {
* @param prefix the new value of 'optPrefix'
*/
public void setOptPrefix(final String prefix) {
-<span class="nc" id="L977"> this.defaultOptPrefix = prefix;</span>
-<span class="nc" id="L978"> }</span>
+<span class="fc" id="L977"> this.defaultOptPrefix = prefix;</span>
+<span class="fc" id="L978"> }</span>
/**
* Sets the 'syntaxPrefix'.
@@ -983,8 +983,8 @@ public class HelpFormatter {
* @param prefix the new value of 'syntaxPrefix'
*/
public void setSyntaxPrefix(final String prefix) {
-<span class="nc" id="L986"> this.defaultSyntaxPrefix = prefix;</span>
-<span class="nc" id="L987"> }</span>
+<span class="fc" id="L986"> this.defaultSyntaxPrefix = prefix;</span>
+<span class="fc" id="L987"> }</span>
/**
* Sets the 'width'.
@@ -992,8 +992,8 @@ public class HelpFormatter {
* @param width the new value of 'width'
*/
public void setWidth(final int width) {
-<span class="nc" id="L995"> this.defaultWidth = width;</span>
-<span class="nc" id="L996"> }</span>
+<span class="fc" id="L995"> this.defaultWidth = width;</span>
+<span class="fc" id="L996"> }</span>
}
</pre><div class="footer"><span class="right">Created with <a href="http://www.jacoco.org/jacoco">JaCoCo</a> 0.8.12.202403310830</span></div></body></html>
\ No newline at end of file
Modified: websites/production/commons/content/proper/commons-cli/jacoco/org.apache.commons.cli/MissingArgumentException.html
==============================================================================
--- websites/production/commons/content/proper/commons-cli/jacoco/org.apache.commons.cli/MissingArgumentException.html (original)
+++ websites/production/commons/content/proper/commons-cli/jacoco/org.apache.commons.cli/MissingArgumentException.html Tue May 28 16:42:49 2024
@@ -1 +1 @@
-<?xml version="1.0" encoding="utf-8"?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"><html xmlns="http://www.w3.org/1999/xhtml" lang="en"><head><meta http-equiv="Content-Type" content="text/html;charset=UTF-8"/><link rel="stylesheet" href="../jacoco-resources/report.css" type="text/css"/><link rel="shortcut icon" href="../jacoco-resources/report.gif" type="image/gif"/><title>MissingArgumentException</title><script type="text/javascript" src="../jacoco-resources/sort.js"></script></head><body onload="initialSort(['breadcrumb'])"><div class="breadcrumb" id="breadcrumb"><span class="info"><a href="../jacoco-sessions.html" class="el_session">Sessions</a></span><a href="../index.html" class="el_report">Apache Commons CLI</a> > <a href="index.html" class="el_package">org.apache.commons.cli</a> > <span class="el_class">MissingArgumentException</span></div><h1>MissingArgumentException</h1><p>A different version of class was
executed at runtime.</p><table class="coverage" cellspacing="0" id="coveragetable"><thead><tr><td class="sortable" id="a" onclick="toggleSort(this)">Element</td><td class="down sortable bar" id="b" onclick="toggleSort(this)">Missed Instructions</td><td class="sortable ctr2" id="c" onclick="toggleSort(this)">Cov.</td><td class="sortable bar" id="d" onclick="toggleSort(this)">Missed Branches</td><td class="sortable ctr2" id="e" onclick="toggleSort(this)">Cov.</td><td class="sortable ctr1" id="f" onclick="toggleSort(this)">Missed</td><td class="sortable ctr2" id="g" onclick="toggleSort(this)">Cxty</td><td class="sortable ctr1" id="h" onclick="toggleSort(this)">Missed</td><td class="sortable ctr2" id="i" onclick="toggleSort(this)">Lines</td><td class="sortable ctr1" id="j" onclick="toggleSort(this)">Missed</td><td class="sortable ctr2" id="k" onclick="toggleSort(this)">Methods</td></tr></thead><tfoot><tr><td>Total</td><td class="bar">21 of 21</td><td class="ctr2">0%</td><td class="bar"
>0 of 0</td><td class="ctr2">n/a</td><td class="ctr1">3</td><td class="ctr2">3</td><td class="ctr1">6</td><td class="ctr2">6</td><td class="ctr1">3</td><td class="ctr2">3</td></tr></tfoot><tbody><tr><td id="a1"><a href="MissingArgumentException.java.html#L39" class="el_method">MissingArgumentException(Option)</a></td><td class="bar" id="b0"><img src="../jacoco-resources/redbar.gif" width="120" height="10" title="14" alt="14"/></td><td class="ctr2" id="c0">0%</td><td class="bar" id="d0"/><td class="ctr2" id="e0">n/a</td><td class="ctr1" id="f0">1</td><td class="ctr2" id="g0">1</td><td class="ctr1" id="h0">3</td><td class="ctr2" id="i0">3</td><td class="ctr1" id="j0">1</td><td class="ctr2" id="k0">1</td></tr><tr><td id="a2"><a href="MissingArgumentException.java.html#L49" class="el_method">MissingArgumentException(String)</a></td><td class="bar" id="b1"><img src="../jacoco-resources/redbar.gif" width="34" height="10" title="4" alt="4"/></td><td class="ctr2" id="c1">0%</td><td class="b
ar" id="d1"/><td class="ctr2" id="e1">n/a</td><td class="ctr1" id="f1">1</td><td class="ctr2" id="g1">1</td><td class="ctr1" id="h1">2</td><td class="ctr2" id="i1">2</td><td class="ctr1" id="j1">1</td><td class="ctr2" id="k1">1</td></tr><tr><td id="a0"><a href="MissingArgumentException.java.html#L59" class="el_method">getOption()</a></td><td class="bar" id="b2"><img src="../jacoco-resources/redbar.gif" width="25" height="10" title="3" alt="3"/></td><td class="ctr2" id="c2">0%</td><td class="bar" id="d2"/><td class="ctr2" id="e2">n/a</td><td class="ctr1" id="f2">1</td><td class="ctr2" id="g2">1</td><td class="ctr1" id="h2">1</td><td class="ctr2" id="i2">1</td><td class="ctr1" id="j2">1</td><td class="ctr2" id="k2">1</td></tr></tbody></table><div class="footer"><span class="right">Created with <a href="http://www.jacoco.org/jacoco">JaCoCo</a> 0.8.12.202403310830</span></div></body></html>
\ No newline at end of file
+<?xml version="1.0" encoding="utf-8"?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"><html xmlns="http://www.w3.org/1999/xhtml" lang="en"><head><meta http-equiv="Content-Type" content="text/html;charset=UTF-8"/><link rel="stylesheet" href="../jacoco-resources/report.css" type="text/css"/><link rel="shortcut icon" href="../jacoco-resources/report.gif" type="image/gif"/><title>MissingArgumentException</title><script type="text/javascript" src="../jacoco-resources/sort.js"></script></head><body onload="initialSort(['breadcrumb'])"><div class="breadcrumb" id="breadcrumb"><span class="info"><a href="../jacoco-sessions.html" class="el_session">Sessions</a></span><a href="../index.html" class="el_report">Apache Commons CLI</a> > <a href="index.html" class="el_package">org.apache.commons.cli</a> > <span class="el_class">MissingArgumentException</span></div><h1>MissingArgumentException</h1><table class="coverage" cellspacing
="0" id="coveragetable"><thead><tr><td class="sortable" id="a" onclick="toggleSort(this)">Element</td><td class="down sortable bar" id="b" onclick="toggleSort(this)">Missed Instructions</td><td class="sortable ctr2" id="c" onclick="toggleSort(this)">Cov.</td><td class="sortable bar" id="d" onclick="toggleSort(this)">Missed Branches</td><td class="sortable ctr2" id="e" onclick="toggleSort(this)">Cov.</td><td class="sortable ctr1" id="f" onclick="toggleSort(this)">Missed</td><td class="sortable ctr2" id="g" onclick="toggleSort(this)">Cxty</td><td class="sortable ctr1" id="h" onclick="toggleSort(this)">Missed</td><td class="sortable ctr2" id="i" onclick="toggleSort(this)">Lines</td><td class="sortable ctr1" id="j" onclick="toggleSort(this)">Missed</td><td class="sortable ctr2" id="k" onclick="toggleSort(this)">Methods</td></tr></thead><tfoot><tr><td>Total</td><td class="bar">0 of 22</td><td class="ctr2">100%</td><td class="bar">0 of 0</td><td class="ctr2">n/a</td><td class="ctr1">0</td
><td class="ctr2">3</td><td class="ctr1">0</td><td class="ctr2">6</td><td class="ctr1">0</td><td class="ctr2">3</td></tr></tfoot><tbody><tr><td id="a1"><a href="MissingArgumentException.java.html#L39" class="el_method">MissingArgumentException(Option)</a></td><td class="bar" id="b0"><img src="../jacoco-resources/greenbar.gif" width="120" height="10" title="15" alt="15"/></td><td class="ctr2" id="c0">100%</td><td class="bar" id="d0"/><td class="ctr2" id="e0">n/a</td><td class="ctr1" id="f0">0</td><td class="ctr2" id="g0">1</td><td class="ctr1" id="h0">0</td><td class="ctr2" id="i0">3</td><td class="ctr1" id="j0">0</td><td class="ctr2" id="k0">1</td></tr><tr><td id="a2"><a href="MissingArgumentException.java.html#L49" class="el_method">MissingArgumentException(String)</a></td><td class="bar" id="b1"><img src="../jacoco-resources/greenbar.gif" width="32" height="10" title="4" alt="4"/></td><td class="ctr2" id="c1">100%</td><td class="bar" id="d1"/><td class="ctr2" id="e1">n/a</td><td c
lass="ctr1" id="f1">0</td><td class="ctr2" id="g1">1</td><td class="ctr1" id="h1">0</td><td class="ctr2" id="i1">2</td><td class="ctr1" id="j1">0</td><td class="ctr2" id="k1">1</td></tr><tr><td id="a0"><a href="MissingArgumentException.java.html#L59" class="el_method">getOption()</a></td><td class="bar" id="b2"><img src="../jacoco-resources/greenbar.gif" width="24" height="10" title="3" alt="3"/></td><td class="ctr2" id="c2">100%</td><td class="bar" id="d2"/><td class="ctr2" id="e2">n/a</td><td class="ctr1" id="f2">0</td><td class="ctr2" id="g2">1</td><td class="ctr1" id="h2">0</td><td class="ctr2" id="i2">1</td><td class="ctr1" id="j2">0</td><td class="ctr2" id="k2">1</td></tr></tbody></table><div class="footer"><span class="right">Created with <a href="http://www.jacoco.org/jacoco">JaCoCo</a> 0.8.12.202403310830</span></div></body></html>
\ No newline at end of file
Modified: websites/production/commons/content/proper/commons-cli/jacoco/org.apache.commons.cli/MissingArgumentException.java.html
==============================================================================
--- websites/production/commons/content/proper/commons-cli/jacoco/org.apache.commons.cli/MissingArgumentException.java.html (original)
+++ websites/production/commons/content/proper/commons-cli/jacoco/org.apache.commons.cli/MissingArgumentException.java.html Tue May 28 16:42:49 2024
@@ -36,9 +36,9 @@ public class MissingArgumentException ex
* @since 1.2
*/
public MissingArgumentException(final Option option) {
-<span class="nc" id="L39"> this("Missing argument for option: " + option.getKey());</span>
-<span class="nc" id="L40"> this.option = option;</span>
-<span class="nc" id="L41"> }</span>
+<span class="fc" id="L39"> this("Missing argument for option: " + option.getKey());</span>
+<span class="fc" id="L40"> this.option = option;</span>
+<span class="fc" id="L41"> }</span>
/**
* Constructs a new {@code MissingArgumentException} with the specified detail message.
@@ -46,8 +46,8 @@ public class MissingArgumentException ex
* @param message the detail message
*/
public MissingArgumentException(final String message) {
-<span class="nc" id="L49"> super(message);</span>
-<span class="nc" id="L50"> }</span>
+<span class="fc" id="L49"> super(message);</span>
+<span class="fc" id="L50"> }</span>
/**
* Gets the option requiring an argument that wasn't provided on the command line.
@@ -56,7 +56,7 @@ public class MissingArgumentException ex
* @since 1.2
*/
public Option getOption() {
-<span class="nc" id="L59"> return option;</span>
+<span class="fc" id="L59"> return option;</span>
}
}
</pre><div class="footer"><span class="right">Created with <a href="http://www.jacoco.org/jacoco">JaCoCo</a> 0.8.12.202403310830</span></div></body></html>
\ No newline at end of file
Modified: websites/production/commons/content/proper/commons-cli/jacoco/org.apache.commons.cli/MissingOptionException.html
==============================================================================
--- websites/production/commons/content/proper/commons-cli/jacoco/org.apache.commons.cli/MissingOptionException.html (original)
+++ websites/production/commons/content/proper/commons-cli/jacoco/org.apache.commons.cli/MissingOptionException.html Tue May 28 16:42:49 2024
@@ -1 +1 @@
-<?xml version="1.0" encoding="utf-8"?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"><html xmlns="http://www.w3.org/1999/xhtml" lang="en"><head><meta http-equiv="Content-Type" content="text/html;charset=UTF-8"/><link rel="stylesheet" href="../jacoco-resources/report.css" type="text/css"/><link rel="shortcut icon" href="../jacoco-resources/report.gif" type="image/gif"/><title>MissingOptionException</title><script type="text/javascript" src="../jacoco-resources/sort.js"></script></head><body onload="initialSort(['breadcrumb'])"><div class="breadcrumb" id="breadcrumb"><span class="info"><a href="../jacoco-sessions.html" class="el_session">Sessions</a></span><a href="../index.html" class="el_report">Apache Commons CLI</a> > <a href="index.html" class="el_package">org.apache.commons.cli</a> > <span class="el_class">MissingOptionException</span></div><h1>MissingOptionException</h1><p>A different version of class was execu
ted at runtime.</p><table class="coverage" cellspacing="0" id="coveragetable"><thead><tr><td class="sortable" id="a" onclick="toggleSort(this)">Element</td><td class="down sortable bar" id="b" onclick="toggleSort(this)">Missed Instructions</td><td class="sortable ctr2" id="c" onclick="toggleSort(this)">Cov.</td><td class="sortable bar" id="d" onclick="toggleSort(this)">Missed Branches</td><td class="sortable ctr2" id="e" onclick="toggleSort(this)">Cov.</td><td class="sortable ctr1" id="f" onclick="toggleSort(this)">Missed</td><td class="sortable ctr2" id="g" onclick="toggleSort(this)">Cxty</td><td class="sortable ctr1" id="h" onclick="toggleSort(this)">Missed</td><td class="sortable ctr2" id="i" onclick="toggleSort(this)">Lines</td><td class="sortable ctr1" id="j" onclick="toggleSort(this)">Missed</td><td class="sortable ctr2" id="k" onclick="toggleSort(this)">Methods</td></tr></thead><tfoot><tr><td>Total</td><td class="bar">56 of 56</td><td class="ctr2">0%</td><td class="bar">6 of
6</td><td class="ctr2">0%</td><td class="ctr1">7</td><td class="ctr2">7</td><td class="ctr1">15</td><td class="ctr2">15</td><td class="ctr1">4</td><td class="ctr2">4</td></tr></tfoot><tbody><tr><td id="a0"><a href="MissingOptionException.java.html#L36" class="el_method">createMessage(List)</a></td><td class="bar" id="b0"><img src="../jacoco-resources/redbar.gif" width="120" height="10" title="41" alt="41"/></td><td class="ctr2" id="c0">0%</td><td class="bar" id="d0"><img src="../jacoco-resources/redbar.gif" width="120" height="10" title="6" alt="6"/></td><td class="ctr2" id="e0">0%</td><td class="ctr1" id="f0">4</td><td class="ctr2" id="g0">4</td><td class="ctr1" id="h0">9</td><td class="ctr2" id="i0">9</td><td class="ctr1" id="j0">1</td><td class="ctr2" id="k0">1</td></tr><tr><td id="a2"><a href="MissingOptionException.java.html#L61" class="el_method">MissingOptionException(List)</a></td><td class="bar" id="b1"><img src="../jacoco-resources/redbar.gif" width="23" height="10" title=
"8" alt="8"/></td><td class="ctr2" id="c1">0%</td><td class="bar" id="d1"/><td class="ctr2" id="e1">n/a</td><td class="ctr1" id="f1">1</td><td class="ctr2" id="g1">1</td><td class="ctr1" id="h1">3</td><td class="ctr2" id="i1">3</td><td class="ctr1" id="j1">1</td><td class="ctr2" id="k1">1</td></tr><tr><td id="a3"><a href="MissingOptionException.java.html#L71" class="el_method">MissingOptionException(String)</a></td><td class="bar" id="b2"><img src="../jacoco-resources/redbar.gif" width="11" height="10" title="4" alt="4"/></td><td class="ctr2" id="c2">0%</td><td class="bar" id="d2"/><td class="ctr2" id="e2">n/a</td><td class="ctr1" id="f2">1</td><td class="ctr2" id="g2">1</td><td class="ctr1" id="h2">2</td><td class="ctr2" id="i2">2</td><td class="ctr1" id="j2">1</td><td class="ctr2" id="k2">1</td></tr><tr><td id="a1"><a href="MissingOptionException.java.html#L82" class="el_method">getMissingOptions()</a></td><td class="bar" id="b3"><img src="../jacoco-resources/redbar.gif" width="8"
height="10" title="3" alt="3"/></td><td class="ctr2" id="c3">0%</td><td class="bar" id="d3"/><td class="ctr2" id="e3">n/a</td><td class="ctr1" id="f3">1</td><td class="ctr2" id="g3">1</td><td class="ctr1" id="h3">1</td><td class="ctr2" id="i3">1</td><td class="ctr1" id="j3">1</td><td class="ctr2" id="k3">1</td></tr></tbody></table><div class="footer"><span class="right">Created with <a href="http://www.jacoco.org/jacoco">JaCoCo</a> 0.8.12.202403310830</span></div></body></html>
\ No newline at end of file
+<?xml version="1.0" encoding="utf-8"?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"><html xmlns="http://www.w3.org/1999/xhtml" lang="en"><head><meta http-equiv="Content-Type" content="text/html;charset=UTF-8"/><link rel="stylesheet" href="../jacoco-resources/report.css" type="text/css"/><link rel="shortcut icon" href="../jacoco-resources/report.gif" type="image/gif"/><title>MissingOptionException</title><script type="text/javascript" src="../jacoco-resources/sort.js"></script></head><body onload="initialSort(['breadcrumb'])"><div class="breadcrumb" id="breadcrumb"><span class="info"><a href="../jacoco-sessions.html" class="el_session">Sessions</a></span><a href="../index.html" class="el_report">Apache Commons CLI</a> > <a href="index.html" class="el_package">org.apache.commons.cli</a> > <span class="el_class">MissingOptionException</span></div><h1>MissingOptionException</h1><table class="coverage" cellspacing="0" i
d="coveragetable"><thead><tr><td class="sortable" id="a" onclick="toggleSort(this)">Element</td><td class="down sortable bar" id="b" onclick="toggleSort(this)">Missed Instructions</td><td class="sortable ctr2" id="c" onclick="toggleSort(this)">Cov.</td><td class="sortable bar" id="d" onclick="toggleSort(this)">Missed Branches</td><td class="sortable ctr2" id="e" onclick="toggleSort(this)">Cov.</td><td class="sortable ctr1" id="f" onclick="toggleSort(this)">Missed</td><td class="sortable ctr2" id="g" onclick="toggleSort(this)">Cxty</td><td class="sortable ctr1" id="h" onclick="toggleSort(this)">Missed</td><td class="sortable ctr2" id="i" onclick="toggleSort(this)">Lines</td><td class="sortable ctr1" id="j" onclick="toggleSort(this)">Missed</td><td class="sortable ctr2" id="k" onclick="toggleSort(this)">Methods</td></tr></thead><tfoot><tr><td>Total</td><td class="bar">0 of 56</td><td class="ctr2">100%</td><td class="bar">0 of 6</td><td class="ctr2">100%</td><td class="ctr1">0</td><td
class="ctr2">7</td><td class="ctr1">0</td><td class="ctr2">15</td><td class="ctr1">0</td><td class="ctr2">4</td></tr></tfoot><tbody><tr><td id="a0"><a href="MissingOptionException.java.html#L36" class="el_method">createMessage(List)</a></td><td class="bar" id="b0"><img src="../jacoco-resources/greenbar.gif" width="120" height="10" title="41" alt="41"/></td><td class="ctr2" id="c0">100%</td><td class="bar" id="d0"><img src="../jacoco-resources/greenbar.gif" width="120" height="10" title="6" alt="6"/></td><td class="ctr2" id="e0">100%</td><td class="ctr1" id="f0">0</td><td class="ctr2" id="g0">4</td><td class="ctr1" id="h0">0</td><td class="ctr2" id="i0">9</td><td class="ctr1" id="j0">0</td><td class="ctr2" id="k0">1</td></tr><tr><td id="a2"><a href="MissingOptionException.java.html#L61" class="el_method">MissingOptionException(List)</a></td><td class="bar" id="b1"><img src="../jacoco-resources/greenbar.gif" width="23" height="10" title="8" alt="8"/></td><td class="ctr2" id="c1">100%<
/td><td class="bar" id="d1"/><td class="ctr2" id="e1">n/a</td><td class="ctr1" id="f1">0</td><td class="ctr2" id="g1">1</td><td class="ctr1" id="h1">0</td><td class="ctr2" id="i1">3</td><td class="ctr1" id="j1">0</td><td class="ctr2" id="k1">1</td></tr><tr><td id="a3"><a href="MissingOptionException.java.html#L71" class="el_method">MissingOptionException(String)</a></td><td class="bar" id="b2"><img src="../jacoco-resources/greenbar.gif" width="11" height="10" title="4" alt="4"/></td><td class="ctr2" id="c2">100%</td><td class="bar" id="d2"/><td class="ctr2" id="e2">n/a</td><td class="ctr1" id="f2">0</td><td class="ctr2" id="g2">1</td><td class="ctr1" id="h2">0</td><td class="ctr2" id="i2">2</td><td class="ctr1" id="j2">0</td><td class="ctr2" id="k2">1</td></tr><tr><td id="a1"><a href="MissingOptionException.java.html#L82" class="el_method">getMissingOptions()</a></td><td class="bar" id="b3"><img src="../jacoco-resources/greenbar.gif" width="8" height="10" title="3" alt="3"/></td><td
class="ctr2" id="c3">100%</td><td class="bar" id="d3"/><td class="ctr2" id="e3">n/a</td><td class="ctr1" id="f3">0</td><td class="ctr2" id="g3">1</td><td class="ctr1" id="h3">0</td><td class="ctr2" id="i3">1</td><td class="ctr1" id="j3">0</td><td class="ctr2" id="k3">1</td></tr></tbody></table><div class="footer"><span class="right">Created with <a href="http://www.jacoco.org/jacoco">JaCoCo</a> 0.8.12.202403310830</span></div></body></html>
\ No newline at end of file
Modified: websites/production/commons/content/proper/commons-cli/jacoco/org.apache.commons.cli/MissingOptionException.java.html
==============================================================================
--- websites/production/commons/content/proper/commons-cli/jacoco/org.apache.commons.cli/MissingOptionException.java.html (original)
+++ websites/production/commons/content/proper/commons-cli/jacoco/org.apache.commons.cli/MissingOptionException.java.html Tue May 28 16:42:49 2024
@@ -33,19 +33,19 @@ public class MissingOptionException exte
* @param missingOptions the list of missing options and groups
*/
private static String createMessage(final List<?> missingOptions) {
-<span class="nc" id="L36"> final StringBuilder buf = new StringBuilder("Missing required option");</span>
-<span class="nc bnc" id="L37" title="All 2 branches missed."> buf.append(missingOptions.size() == 1 ? "" : "s");</span>
-<span class="nc" id="L38"> buf.append(": ");</span>
-
-<span class="nc" id="L40"> final Iterator<?> it = missingOptions.iterator();</span>
-<span class="nc bnc" id="L41" title="All 2 branches missed."> while (it.hasNext()) {</span>
-<span class="nc" id="L42"> buf.append(it.next());</span>
-<span class="nc bnc" id="L43" title="All 2 branches missed."> if (it.hasNext()) {</span>
-<span class="nc" id="L44"> buf.append(", ");</span>
+<span class="fc" id="L36"> final StringBuilder buf = new StringBuilder("Missing required option");</span>
+<span class="fc bfc" id="L37" title="All 2 branches covered."> buf.append(missingOptions.size() == 1 ? "" : "s");</span>
+<span class="fc" id="L38"> buf.append(": ");</span>
+
+<span class="fc" id="L40"> final Iterator<?> it = missingOptions.iterator();</span>
+<span class="fc bfc" id="L41" title="All 2 branches covered."> while (it.hasNext()) {</span>
+<span class="fc" id="L42"> buf.append(it.next());</span>
+<span class="fc bfc" id="L43" title="All 2 branches covered."> if (it.hasNext()) {</span>
+<span class="fc" id="L44"> buf.append(", ");</span>
}
}
-<span class="nc" id="L48"> return buf.toString();</span>
+<span class="fc" id="L48"> return buf.toString();</span>
}
/** The list of missing options and groups */
@@ -58,9 +58,9 @@ public class MissingOptionException exte
* @since 1.2
*/
public MissingOptionException(final List missingOptions) {
-<span class="nc" id="L61"> this(createMessage(missingOptions));</span>
-<span class="nc" id="L62"> this.missingOptions = missingOptions;</span>
-<span class="nc" id="L63"> }</span>
+<span class="fc" id="L61"> this(createMessage(missingOptions));</span>
+<span class="fc" id="L62"> this.missingOptions = missingOptions;</span>
+<span class="fc" id="L63"> }</span>
/**
* Constructs a new {@code MissingSelectedException} with the specified detail message.
@@ -68,8 +68,8 @@ public class MissingOptionException exte
* @param message the detail message
*/
public MissingOptionException(final String message) {
-<span class="nc" id="L71"> super(message);</span>
-<span class="nc" id="L72"> }</span>
+<span class="fc" id="L71"> super(message);</span>
+<span class="fc" id="L72"> }</span>
/**
* Gets the list of options or option groups missing in the command line parsed.
@@ -79,7 +79,7 @@ public class MissingOptionException exte
* @since 1.2
*/
public List getMissingOptions() {
-<span class="nc" id="L82"> return missingOptions;</span>
+<span class="fc" id="L82"> return missingOptions;</span>
}
}
</pre><div class="footer"><span class="right">Created with <a href="http://www.jacoco.org/jacoco">JaCoCo</a> 0.8.12.202403310830</span></div></body></html>
\ No newline at end of file