Modified: websites/production/commons/content/proper/commons-cli/jacoco/org.apache.commons.cli/DefaultParser.java.html ============================================================================== --- websites/production/commons/content/proper/commons-cli/jacoco/org.apache.commons.cli/DefaultParser.java.html (original) +++ websites/production/commons/content/proper/commons-cli/jacoco/org.apache.commons.cli/DefaultParser.java.html Mon Mar 13 09:49:52 2017 @@ -1,4 +1,4 @@ -<?xml version="1.0" encoding="iso-8859-1"?><!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="../.resources/report.css" type="text/css"/><link rel="shortcut icon" href="../.resources/report.gif" type="image/gif"/><title>DefaultParser.java</title><link rel="stylesheet" href="../.resources/prettify.css" type="text/css"/><script type="text/javascript" src="../.resources/prettify.js"></script></head><body onload="window['PR_TAB_WIDTH']=4;prettyPrint()"><div class="breadcrumb" id="breadcrumb"><span class="info"><a href="../.sessions.html" class="el_session">Sessions</a></span><a href="../index.html" class="el_report">Apache Commons CLI</a> > <a href="index.source.html" class="el_package">org.apache.commons.cli</a> > <span class="el_source">DefaultParser.java</span></div><h 1>DefaultParser.java</h1><pre class="source lang-java linenums">/** +<?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>DefaultParser.java</title><link rel="stylesheet" href="../jacoco-resources/prettify.css" type="text/css"/><script type="text/javascript" src="../jacoco-resources/prettify.js"></script></head><body onload="window['PR_TAB_WIDTH']=4;prettyPrint()"><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.source.html" class="el_package">org.apache.commons.cli</a> > <span class="el_source">DefaultP arser.java</span></div><h1>DefaultParser.java</h1><pre class="source lang-java linenums">/** * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. @@ -25,7 +25,7 @@ import java.util.Properties; /** * Default parser. * - * @version $Id: DefaultParser.java 1677454 2015-05-03 17:13:54Z ggregory $ + * @version $Id: DefaultParser.java 1783175 2017-02-16 07:52:05Z britter $ * @since 1.3 */ <span class="fc" id="L31">public class DefaultParser implements CommandLineParser</span> @@ -299,7 +299,20 @@ import java.util.Properties; private boolean isShortOption(String token) { // short options (-S, -SV, -S=V, -SV1=V2, -S1S2) -<span class="fc bfc" id="L302" title="All 6 branches covered."> return token.startsWith("-") && token.length() >= 2 && options.hasShortOption(token.substring(1, 2));</span> +<span class="fc bfc" id="L302" title="All 4 branches covered."> if (!token.startsWith("-") || token.length() == 1)</span> + { +<span class="fc" id="L304"> return false;</span> + } + + // remove leading "-" and "=value" +<span class="fc" id="L308"> int pos = token.indexOf("=");</span> +<span class="pc bpc" id="L309" title="1 of 2 branches missed."> String optName = pos == -1 ? token.substring(1) : token.substring(1, pos);</span> +<span class="fc bfc" id="L310" title="All 2 branches covered."> if (options.hasShortOption(optName))</span> + { +<span class="fc" id="L312"> return true;</span> + } + // check for several concatenated short options +<span class="pc bpc" id="L315" title="1 of 4 branches missed."> return optName.length() > 0 && options.hasShortOption(String.valueOf(optName.charAt(0)));</span> } /** @@ -309,26 +322,26 @@ import java.util.Properties; */ private boolean isLongOption(String token) { -<span class="fc bfc" id="L312" title="All 4 branches covered."> if (!token.startsWith("-") || token.length() == 1)</span> +<span class="fc bfc" id="L325" title="All 4 branches covered."> if (!token.startsWith("-") || token.length() == 1)</span> { -<span class="fc" id="L314"> return false;</span> +<span class="fc" id="L327"> return false;</span> } -<span class="fc" id="L317"> int pos = token.indexOf("=");</span> -<span class="pc bpc" id="L318" title="1 of 2 branches missed."> String t = pos == -1 ? token : token.substring(0, pos);</span> +<span class="fc" id="L330"> int pos = token.indexOf("=");</span> +<span class="pc bpc" id="L331" title="1 of 2 branches missed."> String t = pos == -1 ? token : token.substring(0, pos);</span> -<span class="pc bpc" id="L320" title="1 of 2 branches missed."> if (!options.getMatchingOptions(t).isEmpty())</span> +<span class="pc bpc" id="L333" title="1 of 2 branches missed."> if (!options.getMatchingOptions(t).isEmpty())</span> { // long or partial long options (--L, -L, --L=V, -L=V, --l, --l=V) -<span class="nc" id="L323"> return true;</span> +<span class="nc" id="L336"> return true;</span> } -<span class="pc bpc" id="L325" title="1 of 4 branches missed."> else if (getLongPrefix(token) != null && !token.startsWith("--"))</span> +<span class="pc bpc" id="L338" title="1 of 4 branches missed."> else if (getLongPrefix(token) != null && !token.startsWith("--"))</span> { // -LV -<span class="fc" id="L328"> return true;</span> +<span class="fc" id="L341"> return true;</span> } -<span class="fc" id="L331"> return false;</span> +<span class="fc" id="L344"> return false;</span> } /** @@ -342,17 +355,17 @@ import java.util.Properties; */ private void handleUnknownToken(String token) throws ParseException { -<span class="fc bfc" id="L345" title="All 6 branches covered."> if (token.startsWith("-") && token.length() > 1 && !stopAtNonOption)</span> +<span class="fc bfc" id="L358" title="All 6 branches covered."> if (token.startsWith("-") && token.length() > 1 && !stopAtNonOption)</span> { -<span class="fc" id="L347"> throw new UnrecognizedOptionException("Unrecognized option: " + token, token);</span> +<span class="fc" id="L360"> throw new UnrecognizedOptionException("Unrecognized option: " + token, token);</span> } -<span class="fc" id="L350"> cmd.addArg(token);</span> -<span class="fc bfc" id="L351" title="All 2 branches covered."> if (stopAtNonOption)</span> +<span class="fc" id="L363"> cmd.addArg(token);</span> +<span class="fc bfc" id="L364" title="All 2 branches covered."> if (stopAtNonOption)</span> { -<span class="fc" id="L353"> skipParsing = true;</span> +<span class="fc" id="L366"> skipParsing = true;</span> } -<span class="fc" id="L355"> }</span> +<span class="fc" id="L368"> }</span> /** * Handles the following tokens: @@ -366,15 +379,15 @@ import java.util.Properties; */ private void handleLongOption(String token) throws ParseException { -<span class="fc bfc" id="L369" title="All 2 branches covered."> if (token.indexOf('=') == -1)</span> +<span class="fc bfc" id="L382" title="All 2 branches covered."> if (token.indexOf('=') == -1)</span> { -<span class="fc" id="L371"> handleLongOptionWithoutEqual(token);</span> +<span class="fc" id="L384"> handleLongOptionWithoutEqual(token);</span> } else { -<span class="fc" id="L375"> handleLongOptionWithEqual(token);</span> +<span class="fc" id="L388"> handleLongOptionWithEqual(token);</span> } -<span class="fc" id="L377"> }</span> +<span class="fc" id="L390"> }</span> /** * Handles the following tokens: @@ -388,20 +401,20 @@ import java.util.Properties; */ private void handleLongOptionWithoutEqual(String token) throws ParseException { -<span class="fc" id="L391"> List<String> matchingOpts = options.getMatchingOptions(token);</span> -<span class="fc bfc" id="L392" title="All 2 branches covered."> if (matchingOpts.isEmpty())</span> +<span class="fc" id="L404"> List<String> matchingOpts = options.getMatchingOptions(token);</span> +<span class="fc bfc" id="L405" title="All 2 branches covered."> if (matchingOpts.isEmpty())</span> { -<span class="fc" id="L394"> handleUnknownToken(currentToken);</span> +<span class="fc" id="L407"> handleUnknownToken(currentToken);</span> } -<span class="fc bfc" id="L396" title="All 2 branches covered."> else if (matchingOpts.size() > 1)</span> +<span class="fc bfc" id="L409" title="All 2 branches covered."> else if (matchingOpts.size() > 1)</span> { -<span class="fc" id="L398"> throw new AmbiguousOptionException(token, matchingOpts);</span> +<span class="fc" id="L411"> throw new AmbiguousOptionException(token, matchingOpts);</span> } else { -<span class="fc" id="L402"> handleOption(options.getOption(matchingOpts.get(0)));</span> +<span class="fc" id="L415"> handleOption(options.getOption(matchingOpts.get(0)));</span> } -<span class="fc" id="L404"> }</span> +<span class="fc" id="L417"> }</span> /** * Handles the following tokens: @@ -415,37 +428,37 @@ import java.util.Properties; */ private void handleLongOptionWithEqual(String token) throws ParseException { -<span class="fc" id="L418"> int pos = token.indexOf('=');</span> +<span class="fc" id="L431"> int pos = token.indexOf('=');</span> -<span class="fc" id="L420"> String value = token.substring(pos + 1);</span> +<span class="fc" id="L433"> String value = token.substring(pos + 1);</span> -<span class="fc" id="L422"> String opt = token.substring(0, pos);</span> +<span class="fc" id="L435"> String opt = token.substring(0, pos);</span> -<span class="fc" id="L424"> List<String> matchingOpts = options.getMatchingOptions(opt);</span> -<span class="fc bfc" id="L425" title="All 2 branches covered."> if (matchingOpts.isEmpty())</span> +<span class="fc" id="L437"> List<String> matchingOpts = options.getMatchingOptions(opt);</span> +<span class="fc bfc" id="L438" title="All 2 branches covered."> if (matchingOpts.isEmpty())</span> { -<span class="fc" id="L427"> handleUnknownToken(currentToken);</span> +<span class="fc" id="L440"> handleUnknownToken(currentToken);</span> } -<span class="fc bfc" id="L429" title="All 2 branches covered."> else if (matchingOpts.size() > 1)</span> +<span class="fc bfc" id="L442" title="All 2 branches covered."> else if (matchingOpts.size() > 1)</span> { -<span class="fc" id="L431"> throw new AmbiguousOptionException(opt, matchingOpts);</span> +<span class="fc" id="L444"> throw new AmbiguousOptionException(opt, matchingOpts);</span> } else { -<span class="fc" id="L435"> Option option = options.getOption(matchingOpts.get(0));</span> +<span class="fc" id="L448"> Option option = options.getOption(matchingOpts.get(0));</span> -<span class="pc bpc" id="L437" title="1 of 2 branches missed."> if (option.acceptsArg())</span> +<span class="pc bpc" id="L450" title="1 of 2 branches missed."> if (option.acceptsArg())</span> { -<span class="fc" id="L439"> handleOption(option);</span> -<span class="fc" id="L440"> currentOption.addValueForProcessing(value);</span> -<span class="fc" id="L441"> currentOption = null;</span> +<span class="fc" id="L452"> handleOption(option);</span> +<span class="fc" id="L453"> currentOption.addValueForProcessing(value);</span> +<span class="fc" id="L454"> currentOption = null;</span> } else { -<span class="nc" id="L445"> handleUnknownToken(currentToken);</span> +<span class="nc" id="L458"> handleUnknownToken(currentToken);</span> } } -<span class="fc" id="L448"> }</span> +<span class="fc" id="L461"> }</span> /** * Handles the following tokens: @@ -468,95 +481,95 @@ import java.util.Properties; */ private void handleShortAndLongOption(String token) throws ParseException { -<span class="fc" id="L471"> String t = Util.stripLeadingHyphens(token);</span> +<span class="fc" id="L484"> String t = Util.stripLeadingHyphens(token);</span> -<span class="fc" id="L473"> int pos = t.indexOf('=');</span> +<span class="fc" id="L486"> int pos = t.indexOf('=');</span> -<span class="fc bfc" id="L475" title="All 2 branches covered."> if (t.length() == 1)</span> +<span class="fc bfc" id="L488" title="All 2 branches covered."> if (t.length() == 1)</span> { // -S -<span class="fc bfc" id="L478" title="All 2 branches covered."> if (options.hasShortOption(t))</span> +<span class="fc bfc" id="L491" title="All 2 branches covered."> if (options.hasShortOption(t))</span> { -<span class="fc" id="L480"> handleOption(options.getOption(t));</span> +<span class="fc" id="L493"> handleOption(options.getOption(t));</span> } else { -<span class="fc" id="L484"> handleUnknownToken(token);</span> +<span class="fc" id="L497"> handleUnknownToken(token);</span> } } -<span class="fc bfc" id="L487" title="All 2 branches covered."> else if (pos == -1)</span> +<span class="fc bfc" id="L500" title="All 2 branches covered."> else if (pos == -1)</span> { // no equal sign found (-xxx) -<span class="pc bpc" id="L490" title="1 of 2 branches missed."> if (options.hasShortOption(t))</span> +<span class="fc bfc" id="L503" title="All 2 branches covered."> if (options.hasShortOption(t))</span> { -<span class="nc" id="L492"> handleOption(options.getOption(t));</span> +<span class="fc" id="L505"> handleOption(options.getOption(t));</span> } -<span class="fc bfc" id="L494" title="All 2 branches covered."> else if (!options.getMatchingOptions(t).isEmpty())</span> +<span class="fc bfc" id="L507" title="All 2 branches covered."> else if (!options.getMatchingOptions(t).isEmpty())</span> { // -L or -l -<span class="fc" id="L497"> handleLongOptionWithoutEqual(token);</span> +<span class="fc" id="L510"> handleLongOptionWithoutEqual(token);</span> } else { // look for a long prefix (-Xmx512m) -<span class="fc" id="L502"> String opt = getLongPrefix(t);</span> +<span class="fc" id="L515"> String opt = getLongPrefix(t);</span> -<span class="fc bfc" id="L504" title="All 4 branches covered."> if (opt != null && options.getOption(opt).acceptsArg())</span> +<span class="fc bfc" id="L517" title="All 4 branches covered."> if (opt != null && options.getOption(opt).acceptsArg())</span> { -<span class="fc" id="L506"> handleOption(options.getOption(opt));</span> -<span class="fc" id="L507"> currentOption.addValueForProcessing(t.substring(opt.length()));</span> -<span class="fc" id="L508"> currentOption = null;</span> +<span class="fc" id="L519"> handleOption(options.getOption(opt));</span> +<span class="fc" id="L520"> currentOption.addValueForProcessing(t.substring(opt.length()));</span> +<span class="fc" id="L521"> currentOption = null;</span> } -<span class="fc bfc" id="L510" title="All 2 branches covered."> else if (isJavaProperty(t))</span> +<span class="fc bfc" id="L523" title="All 2 branches covered."> else if (isJavaProperty(t))</span> { // -SV1 (-Dflag) -<span class="fc" id="L513"> handleOption(options.getOption(t.substring(0, 1)));</span> -<span class="fc" id="L514"> currentOption.addValueForProcessing(t.substring(1));</span> -<span class="fc" id="L515"> currentOption = null;</span> +<span class="fc" id="L526"> handleOption(options.getOption(t.substring(0, 1)));</span> +<span class="fc" id="L527"> currentOption.addValueForProcessing(t.substring(1));</span> +<span class="fc" id="L528"> currentOption = null;</span> } else { // -S1S2S3 or -S1S2V -<span class="fc" id="L520"> handleConcatenatedOptions(token);</span> +<span class="fc" id="L533"> handleConcatenatedOptions(token);</span> } -<span class="fc" id="L522"> }</span> +<span class="fc" id="L535"> }</span> } else { // equal sign found (-xxx=yyy) -<span class="fc" id="L527"> String opt = t.substring(0, pos);</span> -<span class="fc" id="L528"> String value = t.substring(pos + 1);</span> +<span class="fc" id="L540"> String opt = t.substring(0, pos);</span> +<span class="fc" id="L541"> String value = t.substring(pos + 1);</span> -<span class="fc bfc" id="L530" title="All 2 branches covered."> if (opt.length() == 1)</span> +<span class="fc bfc" id="L543" title="All 2 branches covered."> if (opt.length() == 1)</span> { // -S=V -<span class="fc" id="L533"> Option option = options.getOption(opt);</span> -<span class="pc bpc" id="L534" title="1 of 4 branches missed."> if (option != null && option.acceptsArg())</span> +<span class="fc" id="L546"> Option option = options.getOption(opt);</span> +<span class="pc bpc" id="L547" title="1 of 4 branches missed."> if (option != null && option.acceptsArg())</span> { -<span class="fc" id="L536"> handleOption(option);</span> -<span class="fc" id="L537"> currentOption.addValueForProcessing(value);</span> -<span class="fc" id="L538"> currentOption = null;</span> +<span class="fc" id="L549"> handleOption(option);</span> +<span class="fc" id="L550"> currentOption.addValueForProcessing(value);</span> +<span class="fc" id="L551"> currentOption = null;</span> } else { -<span class="nc" id="L542"> handleUnknownToken(token);</span> +<span class="nc" id="L555"> handleUnknownToken(token);</span> } -<span class="fc" id="L544"> }</span> -<span class="fc bfc" id="L545" title="All 2 branches covered."> else if (isJavaProperty(opt))</span> +<span class="fc" id="L557"> }</span> +<span class="fc bfc" id="L558" title="All 2 branches covered."> else if (isJavaProperty(opt))</span> { // -SV1=V2 (-Dkey=value) -<span class="fc" id="L548"> handleOption(options.getOption(opt.substring(0, 1)));</span> -<span class="fc" id="L549"> currentOption.addValueForProcessing(opt.substring(1));</span> -<span class="fc" id="L550"> currentOption.addValueForProcessing(value);</span> -<span class="fc" id="L551"> currentOption = null;</span> +<span class="fc" id="L561"> handleOption(options.getOption(opt.substring(0, 1)));</span> +<span class="fc" id="L562"> currentOption.addValueForProcessing(opt.substring(1));</span> +<span class="fc" id="L563"> currentOption.addValueForProcessing(value);</span> +<span class="fc" id="L564"> currentOption = null;</span> } else { // -L=V or -l=V -<span class="fc" id="L556"> handleLongOptionWithEqual(token);</span> +<span class="fc" id="L569"> handleLongOptionWithEqual(token);</span> } } -<span class="fc" id="L559"> }</span> +<span class="fc" id="L572"> }</span> /** * Search for a prefix that is the long name of an option (-Xmx512m) @@ -565,21 +578,21 @@ import java.util.Properties; */ private String getLongPrefix(String token) { -<span class="fc" id="L568"> String t = Util.stripLeadingHyphens(token);</span> +<span class="fc" id="L581"> String t = Util.stripLeadingHyphens(token);</span> int i; -<span class="fc" id="L571"> String opt = null;</span> -<span class="fc bfc" id="L572" title="All 2 branches covered."> for (i = t.length() - 2; i > 1; i--)</span> +<span class="fc" id="L584"> String opt = null;</span> +<span class="fc bfc" id="L585" title="All 2 branches covered."> for (i = t.length() - 2; i > 1; i--)</span> { -<span class="fc" id="L574"> String prefix = t.substring(0, i);</span> -<span class="fc bfc" id="L575" title="All 2 branches covered."> if (options.hasLongOption(prefix))</span> +<span class="fc" id="L587"> String prefix = t.substring(0, i);</span> +<span class="fc bfc" id="L588" title="All 2 branches covered."> if (options.hasLongOption(prefix))</span> { -<span class="fc" id="L577"> opt = prefix;</span> -<span class="fc" id="L578"> break;</span> +<span class="fc" id="L590"> opt = prefix;</span> +<span class="fc" id="L591"> break;</span> } } -<span class="fc" id="L582"> return opt;</span> +<span class="fc" id="L595"> return opt;</span> } /** @@ -587,32 +600,32 @@ import java.util.Properties; */ private boolean isJavaProperty(String token) { -<span class="fc" id="L590"> String opt = token.substring(0, 1);</span> -<span class="fc" id="L591"> Option option = options.getOption(opt);</span> +<span class="fc" id="L603"> String opt = token.substring(0, 1);</span> +<span class="fc" id="L604"> Option option = options.getOption(opt);</span> -<span class="pc bpc" id="L593" title="1 of 6 branches missed."> return option != null && (option.getArgs() >= 2 || option.getArgs() == Option.UNLIMITED_VALUES);</span> +<span class="pc bpc" id="L606" title="1 of 6 branches missed."> return option != null && (option.getArgs() >= 2 || option.getArgs() == Option.UNLIMITED_VALUES);</span> } private void handleOption(Option option) throws ParseException { // check the previous option before handling the next one -<span class="fc" id="L599"> checkRequiredArgs();</span> +<span class="fc" id="L612"> checkRequiredArgs();</span> -<span class="fc" id="L601"> option = (Option) option.clone();</span> +<span class="fc" id="L614"> option = (Option) option.clone();</span> -<span class="fc" id="L603"> updateRequiredOptions(option);</span> +<span class="fc" id="L616"> updateRequiredOptions(option);</span> -<span class="fc" id="L605"> cmd.addOption(option);</span> +<span class="fc" id="L618"> cmd.addOption(option);</span> -<span class="fc bfc" id="L607" title="All 2 branches covered."> if (option.hasArg())</span> +<span class="fc bfc" id="L620" title="All 2 branches covered."> if (option.hasArg())</span> { -<span class="fc" id="L609"> currentOption = option;</span> +<span class="fc" id="L622"> currentOption = option;</span> } else { -<span class="fc" id="L613"> currentOption = null;</span> +<span class="fc" id="L626"> currentOption = null;</span> } -<span class="fc" id="L615"> }</span> +<span class="fc" id="L628"> }</span> /** * Removes the option or its group from the list of expected elements. @@ -621,24 +634,24 @@ import java.util.Properties; */ private void updateRequiredOptions(Option option) throws AlreadySelectedException { -<span class="fc bfc" id="L624" title="All 2 branches covered."> if (option.isRequired())</span> +<span class="fc bfc" id="L637" title="All 2 branches covered."> if (option.isRequired())</span> { -<span class="fc" id="L626"> expectedOpts.remove(option.getKey());</span> +<span class="fc" id="L639"> expectedOpts.remove(option.getKey());</span> } // if the option is in an OptionGroup make that option the selected option of the group -<span class="fc bfc" id="L630" title="All 2 branches covered."> if (options.getOptionGroup(option) != null)</span> +<span class="fc bfc" id="L643" title="All 2 branches covered."> if (options.getOptionGroup(option) != null)</span> { -<span class="fc" id="L632"> OptionGroup group = options.getOptionGroup(option);</span> +<span class="fc" id="L645"> OptionGroup group = options.getOptionGroup(option);</span> -<span class="pc bpc" id="L634" title="1 of 2 branches missed."> if (group.isRequired())</span> +<span class="pc bpc" id="L647" title="1 of 2 branches missed."> if (group.isRequired())</span> { -<span class="nc" id="L636"> expectedOpts.remove(group);</span> +<span class="nc" id="L649"> expectedOpts.remove(group);</span> } -<span class="fc" id="L639"> group.setSelected(option);</span> +<span class="fc" id="L652"> group.setSelected(option);</span> } -<span class="fc" id="L641"> }</span> +<span class="fc" id="L654"> }</span> /** * Breaks <code>token</code> into its constituent parts @@ -646,7 +659,7 @@ import java.util.Properties; * * <ul> * <li>ignore the first character ("<b>-</b>")</li> - * <li>foreach remaining character check if an {@link Option} + * <li>for each remaining character check if an {@link Option} * exists with that id.</li> * <li>if an {@link Option} does exist then add that character * prepended with "<b>-</b>" to the list of processed tokens.</li> @@ -669,27 +682,27 @@ import java.util.Properties; */ protected void handleConcatenatedOptions(String token) throws ParseException { -<span class="fc bfc" id="L672" title="All 2 branches covered."> for (int i = 1; i < token.length(); i++)</span> +<span class="fc bfc" id="L685" title="All 2 branches covered."> for (int i = 1; i < token.length(); i++)</span> { -<span class="fc" id="L674"> String ch = String.valueOf(token.charAt(i));</span> +<span class="fc" id="L687"> String ch = String.valueOf(token.charAt(i));</span> -<span class="fc bfc" id="L676" title="All 2 branches covered."> if (options.hasOption(ch))</span> +<span class="fc bfc" id="L689" title="All 2 branches covered."> if (options.hasOption(ch))</span> { -<span class="fc" id="L678"> handleOption(options.getOption(ch));</span> +<span class="fc" id="L691"> handleOption(options.getOption(ch));</span> -<span class="fc bfc" id="L680" title="All 4 branches covered."> if (currentOption != null && token.length() != i + 1)</span> +<span class="fc bfc" id="L693" title="All 4 branches covered."> if (currentOption != null && token.length() != i + 1)</span> { // add the trail as an argument of the option -<span class="fc" id="L683"> currentOption.addValueForProcessing(token.substring(i + 1));</span> -<span class="fc" id="L684"> break;</span> +<span class="fc" id="L696"> currentOption.addValueForProcessing(token.substring(i + 1));</span> +<span class="fc" id="L697"> break;</span> } } else { -<span class="pc bpc" id="L689" title="1 of 4 branches missed."> handleUnknownToken(stopAtNonOption && i > 1 ? token.substring(i) : token);</span> -<span class="fc" id="L690"> break;</span> +<span class="pc bpc" id="L702" title="1 of 4 branches missed."> handleUnknownToken(stopAtNonOption && i > 1 ? token.substring(i) : token);</span> +<span class="fc" id="L703"> break;</span> } } -<span class="fc" id="L693"> }</span> +<span class="fc" id="L706"> }</span> } -</pre><div class="footer"><span class="right">Created with <a href="http://www.eclemma.org/jacoco">JaCoCo</a> 0.7.2.201409121644</span></div></body></html> \ No newline at end of file +</pre><div class="footer"><span class="right">Created with <a href="http://www.eclemma.org/jacoco">JaCoCo</a> 0.7.7.201606060606</span></div></body></html> \ No newline at end of file
Modified: websites/production/commons/content/proper/commons-cli/jacoco/org.apache.commons.cli/GnuParser.html ============================================================================== --- websites/production/commons/content/proper/commons-cli/jacoco/org.apache.commons.cli/GnuParser.html (original) +++ websites/production/commons/content/proper/commons-cli/jacoco/org.apache.commons.cli/GnuParser.html Mon Mar 13 09:49:52 2017 @@ -1 +1 @@ -<?xml version="1.0" encoding="iso-8859-1"?><!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="../.resources/report.css" type="text/css"/><link rel="shortcut icon" href="../.resources/report.gif" type="image/gif"/><title>GnuParser</title><script type="text/javascript" src="../.resources/sort.js"></script></head><body onload="initialSort(['breadcrumb'])"><div class="breadcrumb" id="breadcrumb"><span class="info"><a href="../.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">GnuParser</span></div><h1>GnuParser</h1><table class="coverage" cellspacing="0" id="coveragetable"><thead><tr><td class="sortable" id="a" o nclick="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 145</td><td class="ctr2">100%</td><td class="bar">0 of 20</td><td class="ctr2">100%</td><td class="ctr1">0</td><td class="ctr2">12</td><td class="ctr1">0</td><td class="ct r2">28</td><td class="ctr1">0</td><td class="ctr2">2</td></tr></tfoot><tbody><tr><td id="a0"><a href="GnuParser.java.html#L53" class="el_method">flatten(Options, String[], boolean)</a></td><td class="bar" id="b0"><img src="../.resources/greenbar.gif" width="120" height="10" title="142" alt="142"/></td><td class="ctr2" id="c0">100%</td><td class="bar" id="d0"><img src="../.resources/greenbar.gif" width="120" height="10" title="20" alt="20"/></td><td class="ctr2" id="e0">100%</td><td class="ctr1" id="f0">0</td><td class="ctr2" id="g0">11</td><td class="ctr1" id="h0">0</td><td class="ctr2" id="i0">27</td><td class="ctr1" id="j0">0</td><td class="ctr2" id="k0">1</td></tr><tr><td id="a1"><a href="GnuParser.java.html#L31" class="el_method">GnuParser()</a></td><td class="bar" id="b1"><img src="../.resources/greenbar.gif" width="2" height="10" title="3" alt="3"/></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><t d class="ctr2" id="g1">1</td><td class="ctr1" id="h1">0</td><td class="ctr2" id="i1">1</td><td class="ctr1" id="j1">0</td><td class="ctr2" id="k1">1</td></tr></tbody></table><div class="footer"><span class="right">Created with <a href="http://www.eclemma.org/jacoco">JaCoCo</a> 0.7.2.201409121644</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>GnuParser</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">GnuParser</span></div><h1>GnuParser</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 145</td><td class="ctr2">100%</td><td class="bar">0 of 20</td><td class="ctr2">100%</td><td class="ctr1">0</td><td class="ctr2">12</td><td class="ctr1"> 0</td><td class="ctr2">28</td><td class="ctr1">0</td><td class="ctr2">2</td></tr></tfoot><tbody><tr><td id="a0"><a href="GnuParser.java.html#L53" class="el_method">flatten(Options, String[], boolean)</a></td><td class="bar" id="b0"><img src="../jacoco-resources/greenbar.gif" width="120" height="10" title="142" alt="142"/></td><td class="ctr2" id="c0">100%</td><td class="bar" id="d0"><img src="../jacoco-resources/greenbar.gif" width="120" height="10" title="20" alt="20"/></td><td class="ctr2" id="e0">100%</td><td class="ctr1" id="f0">0</td><td class="ctr2" id="g0">11</td><td class="ctr1" id="h0">0</td><td class="ctr2" id="i0">27</td><td class="ctr1" id="j0">0</td><td class="ctr2" id="k0">1</td></tr><tr><td id="a1"><a href="GnuParser.java.html#L31" class="el_method">GnuParser()</a></td><td class="bar" id="b1"><img src="../jacoco-resources/greenbar.gif" width="2" height="10" title="3" alt="3"/></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">1</td><td class="ctr1" id="j1">0</td><td class="ctr2" id="k1">1</td></tr></tbody></table><div class="footer"><span class="right">Created with <a href="http://www.eclemma.org/jacoco">JaCoCo</a> 0.7.7.201606060606</span></div></body></html> \ No newline at end of file Modified: websites/production/commons/content/proper/commons-cli/jacoco/org.apache.commons.cli/GnuParser.java.html ============================================================================== --- websites/production/commons/content/proper/commons-cli/jacoco/org.apache.commons.cli/GnuParser.java.html (original) +++ websites/production/commons/content/proper/commons-cli/jacoco/org.apache.commons.cli/GnuParser.java.html Mon Mar 13 09:49:52 2017 @@ -1,4 +1,4 @@ -<?xml version="1.0" encoding="iso-8859-1"?><!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="../.resources/report.css" type="text/css"/><link rel="shortcut icon" href="../.resources/report.gif" type="image/gif"/><title>GnuParser.java</title><link rel="stylesheet" href="../.resources/prettify.css" type="text/css"/><script type="text/javascript" src="../.resources/prettify.js"></script></head><body onload="window['PR_TAB_WIDTH']=4;prettyPrint()"><div class="breadcrumb" id="breadcrumb"><span class="info"><a href="../.sessions.html" class="el_session">Sessions</a></span><a href="../index.html" class="el_report">Apache Commons CLI</a> > <a href="index.source.html" class="el_package">org.apache.commons.cli</a> > <span class="el_source">GnuParser.java</span></div><h1>GnuPar ser.java</h1><pre class="source lang-java linenums">/** +<?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>GnuParser.java</title><link rel="stylesheet" href="../jacoco-resources/prettify.css" type="text/css"/><script type="text/javascript" src="../jacoco-resources/prettify.js"></script></head><body onload="window['PR_TAB_WIDTH']=4;prettyPrint()"><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.source.html" class="el_package">org.apache.commons.cli</a> > <span class="el_source">GnuParser.ja va</span></div><h1>GnuParser.java</h1><pre class="source lang-java linenums">/** * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. @@ -113,4 +113,4 @@ import java.util.List; <span class="fc" id="L113"> return tokens.toArray(new String[tokens.size()]);</span> } } -</pre><div class="footer"><span class="right">Created with <a href="http://www.eclemma.org/jacoco">JaCoCo</a> 0.7.2.201409121644</span></div></body></html> \ No newline at end of file +</pre><div class="footer"><span class="right">Created with <a href="http://www.eclemma.org/jacoco">JaCoCo</a> 0.7.7.201606060606</span></div></body></html> \ No newline at end of file Modified: websites/production/commons/content/proper/commons-cli/jacoco/org.apache.commons.cli/HelpFormatter$OptionComparator.html ============================================================================== --- websites/production/commons/content/proper/commons-cli/jacoco/org.apache.commons.cli/HelpFormatter$OptionComparator.html (original) +++ websites/production/commons/content/proper/commons-cli/jacoco/org.apache.commons.cli/HelpFormatter$OptionComparator.html Mon Mar 13 09:49:52 2017 @@ -1 +1 @@ -<?xml version="1.0" encoding="iso-8859-1"?><!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="../.resources/report.css" type="text/css"/><link rel="shortcut icon" href="../.resources/report.gif" type="image/gif"/><title>HelpFormatter.OptionComparator</title><script type="text/javascript" src="../.resources/sort.js"></script></head><body onload="initialSort(['breadcrumb'])"><div class="breadcrumb" id="breadcrumb"><span class="info"><a href="../.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">HelpFormatter.OptionComparator</span></div><h1>HelpFormatter.OptionComparator</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 9</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">2</td><td class="ctr1">0</td><td class="ctr2">2</td><td class="ctr1">0</td><td class="ctr2">2</td></tr></tfoot><tbody><tr><td id="a0"><a href="HelpFormatter.java.html#L1090" class="el_method">compare(Option, Option)</a></td><td class="bar" id="b0"><img src="../.resources/greenbar.gif" width="120" height="10" title="6" alt="6"/></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">1</td><td class="ctr1" id="j0">0</td><td class="ctr2" id="k0">1</td></tr><tr><td id="a1"><a href="HelpFormatter.java.html#L1072" class="el_method">HelpFormatter.OptionComparator()</a></td><td class="bar" id="b1"><img src="../.resources/greenbar.gif" width="60" height="10" title="3" alt="3"/></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">1</td><td class="ctr1" id="j1">0</td><td class="ctr2" id="k1">1</td></tr></tbody></table><div class="footer"><span class="right">Created with <a href="http://www.eclemma.org/jacoco">JaCoCo</a> 0.7.2.201409121644</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>HelpFormatter.OptionComparator</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">HelpFormatter.OptionComparator</span></div><h1>HelpFormatter.OptionComparator</h1><table class="cov erage" 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 9</td><td class="ctr2">100%</td><td class="bar">0 of 0</td><td class="ctr2">n/a</td><td c lass="ctr1">0</td><td class="ctr2">2</td><td class="ctr1">0</td><td class="ctr2">2</td><td class="ctr1">0</td><td class="ctr2">2</td></tr></tfoot><tbody><tr><td id="a0"><a href="HelpFormatter.java.html#L1090" class="el_method">compare(Option, Option)</a></td><td class="bar" id="b0"><img src="../jacoco-resources/greenbar.gif" width="120" height="10" title="6" alt="6"/></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">1</td><td class="ctr1" id="j0">0</td><td class="ctr2" id="k0">1</td></tr><tr><td id="a1"><a href="HelpFormatter.java.html#L1072" class="el_method">HelpFormatter.OptionComparator()</a></td><td class="bar" id="b1"><img src="../jacoco-resources/greenbar.gif" width="60" height="10" title="3" alt="3"/></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">1</td><td class="ctr1" id="j1">0</td><td class="ctr2" id="k1">1</td></tr></tbody></table><div class="footer"><span class="right">Created with <a href="http://www.eclemma.org/jacoco">JaCoCo</a> 0.7.7.201606060606</span></div></body></html> \ No newline at end of file