commons-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From brit...@apache.org
Subject svn commit: r1008235 [5/39] - 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/ css/ images/ images/svg/ jacoco-agg...
Date Mon, 13 Mar 2017 09:49:55 GMT
Modified: websites/production/commons/content/proper/commons-cli/apidocs/src-html/org/apache/commons/cli/DefaultParser.html
==============================================================================
--- websites/production/commons/content/proper/commons-cli/apidocs/src-html/org/apache/commons/cli/DefaultParser.html (original)
+++ websites/production/commons/content/proper/commons-cli/apidocs/src-html/org/apache/commons/cli/DefaultParser.html Mon Mar 13 09:49:52 2017
@@ -33,7 +33,7 @@
 <span class="sourceLineNo">025</span>/**<a name="line.25"></a>
 <span class="sourceLineNo">026</span> * Default parser.<a name="line.26"></a>
 <span class="sourceLineNo">027</span> * <a name="line.27"></a>
-<span class="sourceLineNo">028</span> * @version $Id: DefaultParser.java 1677454 2015-05-03 17:13:54Z ggregory $<a name="line.28"></a>
+<span class="sourceLineNo">028</span> * @version $Id: DefaultParser.java 1783175 2017-02-16 07:52:05Z britter $<a name="line.28"></a>
 <span class="sourceLineNo">029</span> * @since 1.3<a name="line.29"></a>
 <span class="sourceLineNo">030</span> */<a name="line.30"></a>
 <span class="sourceLineNo">031</span>public class DefaultParser implements CommandLineParser<a name="line.31"></a>
@@ -307,399 +307,412 @@
 <span class="sourceLineNo">299</span>    private boolean isShortOption(String token)<a name="line.299"></a>
 <span class="sourceLineNo">300</span>    {<a name="line.300"></a>
 <span class="sourceLineNo">301</span>        // short options (-S, -SV, -S=V, -SV1=V2, -S1S2)<a name="line.301"></a>
-<span class="sourceLineNo">302</span>        return token.startsWith("-") &amp;&amp; token.length() &gt;= 2 &amp;&amp; options.hasShortOption(token.substring(1, 2));<a name="line.302"></a>
-<span class="sourceLineNo">303</span>    }<a name="line.303"></a>
-<span class="sourceLineNo">304</span><a name="line.304"></a>
-<span class="sourceLineNo">305</span>    /**<a name="line.305"></a>
-<span class="sourceLineNo">306</span>     * Tells if the token looks like a long option.<a name="line.306"></a>
-<span class="sourceLineNo">307</span>     *<a name="line.307"></a>
-<span class="sourceLineNo">308</span>     * @param token<a name="line.308"></a>
-<span class="sourceLineNo">309</span>     */<a name="line.309"></a>
-<span class="sourceLineNo">310</span>    private boolean isLongOption(String token)<a name="line.310"></a>
-<span class="sourceLineNo">311</span>    {<a name="line.311"></a>
-<span class="sourceLineNo">312</span>        if (!token.startsWith("-") || token.length() == 1)<a name="line.312"></a>
-<span class="sourceLineNo">313</span>        {<a name="line.313"></a>
-<span class="sourceLineNo">314</span>            return false;<a name="line.314"></a>
-<span class="sourceLineNo">315</span>        }<a name="line.315"></a>
-<span class="sourceLineNo">316</span><a name="line.316"></a>
-<span class="sourceLineNo">317</span>        int pos = token.indexOf("=");<a name="line.317"></a>
-<span class="sourceLineNo">318</span>        String t = pos == -1 ? token : token.substring(0, pos);<a name="line.318"></a>
-<span class="sourceLineNo">319</span><a name="line.319"></a>
-<span class="sourceLineNo">320</span>        if (!options.getMatchingOptions(t).isEmpty())<a name="line.320"></a>
-<span class="sourceLineNo">321</span>        {<a name="line.321"></a>
-<span class="sourceLineNo">322</span>            // long or partial long options (--L, -L, --L=V, -L=V, --l, --l=V)<a name="line.322"></a>
-<span class="sourceLineNo">323</span>            return true;<a name="line.323"></a>
-<span class="sourceLineNo">324</span>        }<a name="line.324"></a>
-<span class="sourceLineNo">325</span>        else if (getLongPrefix(token) != null &amp;&amp; !token.startsWith("--"))<a name="line.325"></a>
+<span class="sourceLineNo">302</span>        if (!token.startsWith("-") || token.length() == 1)<a name="line.302"></a>
+<span class="sourceLineNo">303</span>        {<a name="line.303"></a>
+<span class="sourceLineNo">304</span>            return false;<a name="line.304"></a>
+<span class="sourceLineNo">305</span>        }<a name="line.305"></a>
+<span class="sourceLineNo">306</span><a name="line.306"></a>
+<span class="sourceLineNo">307</span>        // remove leading "-" and "=value"<a name="line.307"></a>
+<span class="sourceLineNo">308</span>        int pos = token.indexOf("=");<a name="line.308"></a>
+<span class="sourceLineNo">309</span>        String optName = pos == -1 ? token.substring(1) : token.substring(1, pos);<a name="line.309"></a>
+<span class="sourceLineNo">310</span>        if (options.hasShortOption(optName))<a name="line.310"></a>
+<span class="sourceLineNo">311</span>        {<a name="line.311"></a>
+<span class="sourceLineNo">312</span>            return true;<a name="line.312"></a>
+<span class="sourceLineNo">313</span>        }<a name="line.313"></a>
+<span class="sourceLineNo">314</span>        // check for several concatenated short options<a name="line.314"></a>
+<span class="sourceLineNo">315</span>        return optName.length() &gt; 0 &amp;&amp; options.hasShortOption(String.valueOf(optName.charAt(0)));<a name="line.315"></a>
+<span class="sourceLineNo">316</span>    }<a name="line.316"></a>
+<span class="sourceLineNo">317</span><a name="line.317"></a>
+<span class="sourceLineNo">318</span>    /**<a name="line.318"></a>
+<span class="sourceLineNo">319</span>     * Tells if the token looks like a long option.<a name="line.319"></a>
+<span class="sourceLineNo">320</span>     *<a name="line.320"></a>
+<span class="sourceLineNo">321</span>     * @param token<a name="line.321"></a>
+<span class="sourceLineNo">322</span>     */<a name="line.322"></a>
+<span class="sourceLineNo">323</span>    private boolean isLongOption(String token)<a name="line.323"></a>
+<span class="sourceLineNo">324</span>    {<a name="line.324"></a>
+<span class="sourceLineNo">325</span>        if (!token.startsWith("-") || token.length() == 1)<a name="line.325"></a>
 <span class="sourceLineNo">326</span>        {<a name="line.326"></a>
-<span class="sourceLineNo">327</span>            // -LV<a name="line.327"></a>
-<span class="sourceLineNo">328</span>            return true;<a name="line.328"></a>
-<span class="sourceLineNo">329</span>        }<a name="line.329"></a>
-<span class="sourceLineNo">330</span><a name="line.330"></a>
-<span class="sourceLineNo">331</span>        return false;<a name="line.331"></a>
-<span class="sourceLineNo">332</span>    }<a name="line.332"></a>
-<span class="sourceLineNo">333</span><a name="line.333"></a>
-<span class="sourceLineNo">334</span>    /**<a name="line.334"></a>
-<span class="sourceLineNo">335</span>     * Handles an unknown token. If the token starts with a dash an <a name="line.335"></a>
-<span class="sourceLineNo">336</span>     * UnrecognizedOptionException is thrown. Otherwise the token is added <a name="line.336"></a>
-<span class="sourceLineNo">337</span>     * to the arguments of the command line. If the stopAtNonOption flag <a name="line.337"></a>
-<span class="sourceLineNo">338</span>     * is set, this stops the parsing and the remaining tokens are added <a name="line.338"></a>
-<span class="sourceLineNo">339</span>     * as-is in the arguments of the command line.<a name="line.339"></a>
-<span class="sourceLineNo">340</span>     *<a name="line.340"></a>
-<span class="sourceLineNo">341</span>     * @param token the command line token to handle<a name="line.341"></a>
-<span class="sourceLineNo">342</span>     */<a name="line.342"></a>
-<span class="sourceLineNo">343</span>    private void handleUnknownToken(String token) throws ParseException<a name="line.343"></a>
-<span class="sourceLineNo">344</span>    {<a name="line.344"></a>
-<span class="sourceLineNo">345</span>        if (token.startsWith("-") &amp;&amp; token.length() &gt; 1 &amp;&amp; !stopAtNonOption)<a name="line.345"></a>
-<span class="sourceLineNo">346</span>        {<a name="line.346"></a>
-<span class="sourceLineNo">347</span>            throw new UnrecognizedOptionException("Unrecognized option: " + token, token);<a name="line.347"></a>
-<span class="sourceLineNo">348</span>        }<a name="line.348"></a>
-<span class="sourceLineNo">349</span><a name="line.349"></a>
-<span class="sourceLineNo">350</span>        cmd.addArg(token);<a name="line.350"></a>
-<span class="sourceLineNo">351</span>        if (stopAtNonOption)<a name="line.351"></a>
-<span class="sourceLineNo">352</span>        {<a name="line.352"></a>
-<span class="sourceLineNo">353</span>            skipParsing = true;<a name="line.353"></a>
-<span class="sourceLineNo">354</span>        }<a name="line.354"></a>
-<span class="sourceLineNo">355</span>    }<a name="line.355"></a>
-<span class="sourceLineNo">356</span><a name="line.356"></a>
-<span class="sourceLineNo">357</span>    /**<a name="line.357"></a>
-<span class="sourceLineNo">358</span>     * Handles the following tokens:<a name="line.358"></a>
-<span class="sourceLineNo">359</span>     *<a name="line.359"></a>
-<span class="sourceLineNo">360</span>     * --L<a name="line.360"></a>
-<span class="sourceLineNo">361</span>     * --L=V<a name="line.361"></a>
-<span class="sourceLineNo">362</span>     * --L V<a name="line.362"></a>
-<span class="sourceLineNo">363</span>     * --l<a name="line.363"></a>
-<span class="sourceLineNo">364</span>     *<a name="line.364"></a>
-<span class="sourceLineNo">365</span>     * @param token the command line token to handle<a name="line.365"></a>
-<span class="sourceLineNo">366</span>     */<a name="line.366"></a>
-<span class="sourceLineNo">367</span>    private void handleLongOption(String token) throws ParseException<a name="line.367"></a>
-<span class="sourceLineNo">368</span>    {<a name="line.368"></a>
-<span class="sourceLineNo">369</span>        if (token.indexOf('=') == -1)<a name="line.369"></a>
-<span class="sourceLineNo">370</span>        {<a name="line.370"></a>
-<span class="sourceLineNo">371</span>            handleLongOptionWithoutEqual(token);<a name="line.371"></a>
-<span class="sourceLineNo">372</span>        }<a name="line.372"></a>
-<span class="sourceLineNo">373</span>        else<a name="line.373"></a>
-<span class="sourceLineNo">374</span>        {<a name="line.374"></a>
-<span class="sourceLineNo">375</span>            handleLongOptionWithEqual(token);<a name="line.375"></a>
-<span class="sourceLineNo">376</span>        }<a name="line.376"></a>
-<span class="sourceLineNo">377</span>    }<a name="line.377"></a>
-<span class="sourceLineNo">378</span><a name="line.378"></a>
-<span class="sourceLineNo">379</span>    /**<a name="line.379"></a>
-<span class="sourceLineNo">380</span>     * Handles the following tokens:<a name="line.380"></a>
-<span class="sourceLineNo">381</span>     *<a name="line.381"></a>
-<span class="sourceLineNo">382</span>     * --L<a name="line.382"></a>
-<span class="sourceLineNo">383</span>     * -L<a name="line.383"></a>
-<span class="sourceLineNo">384</span>     * --l<a name="line.384"></a>
-<span class="sourceLineNo">385</span>     * -l<a name="line.385"></a>
-<span class="sourceLineNo">386</span>     * <a name="line.386"></a>
-<span class="sourceLineNo">387</span>     * @param token the command line token to handle<a name="line.387"></a>
-<span class="sourceLineNo">388</span>     */<a name="line.388"></a>
-<span class="sourceLineNo">389</span>    private void handleLongOptionWithoutEqual(String token) throws ParseException<a name="line.389"></a>
-<span class="sourceLineNo">390</span>    {<a name="line.390"></a>
-<span class="sourceLineNo">391</span>        List&lt;String&gt; matchingOpts = options.getMatchingOptions(token);<a name="line.391"></a>
-<span class="sourceLineNo">392</span>        if (matchingOpts.isEmpty())<a name="line.392"></a>
-<span class="sourceLineNo">393</span>        {<a name="line.393"></a>
-<span class="sourceLineNo">394</span>            handleUnknownToken(currentToken);<a name="line.394"></a>
-<span class="sourceLineNo">395</span>        }<a name="line.395"></a>
-<span class="sourceLineNo">396</span>        else if (matchingOpts.size() &gt; 1)<a name="line.396"></a>
-<span class="sourceLineNo">397</span>        {<a name="line.397"></a>
-<span class="sourceLineNo">398</span>            throw new AmbiguousOptionException(token, matchingOpts);<a name="line.398"></a>
-<span class="sourceLineNo">399</span>        }<a name="line.399"></a>
-<span class="sourceLineNo">400</span>        else<a name="line.400"></a>
-<span class="sourceLineNo">401</span>        {<a name="line.401"></a>
-<span class="sourceLineNo">402</span>            handleOption(options.getOption(matchingOpts.get(0)));<a name="line.402"></a>
-<span class="sourceLineNo">403</span>        }<a name="line.403"></a>
-<span class="sourceLineNo">404</span>    }<a name="line.404"></a>
-<span class="sourceLineNo">405</span><a name="line.405"></a>
-<span class="sourceLineNo">406</span>    /**<a name="line.406"></a>
-<span class="sourceLineNo">407</span>     * Handles the following tokens:<a name="line.407"></a>
-<span class="sourceLineNo">408</span>     *<a name="line.408"></a>
-<span class="sourceLineNo">409</span>     * --L=V<a name="line.409"></a>
-<span class="sourceLineNo">410</span>     * -L=V<a name="line.410"></a>
-<span class="sourceLineNo">411</span>     * --l=V<a name="line.411"></a>
-<span class="sourceLineNo">412</span>     * -l=V<a name="line.412"></a>
-<span class="sourceLineNo">413</span>     *<a name="line.413"></a>
-<span class="sourceLineNo">414</span>     * @param token the command line token to handle<a name="line.414"></a>
-<span class="sourceLineNo">415</span>     */<a name="line.415"></a>
-<span class="sourceLineNo">416</span>    private void handleLongOptionWithEqual(String token) throws ParseException<a name="line.416"></a>
-<span class="sourceLineNo">417</span>    {<a name="line.417"></a>
-<span class="sourceLineNo">418</span>        int pos = token.indexOf('=');<a name="line.418"></a>
-<span class="sourceLineNo">419</span><a name="line.419"></a>
-<span class="sourceLineNo">420</span>        String value = token.substring(pos + 1);<a name="line.420"></a>
-<span class="sourceLineNo">421</span><a name="line.421"></a>
-<span class="sourceLineNo">422</span>        String opt = token.substring(0, pos);<a name="line.422"></a>
-<span class="sourceLineNo">423</span><a name="line.423"></a>
-<span class="sourceLineNo">424</span>        List&lt;String&gt; matchingOpts = options.getMatchingOptions(opt);<a name="line.424"></a>
-<span class="sourceLineNo">425</span>        if (matchingOpts.isEmpty())<a name="line.425"></a>
-<span class="sourceLineNo">426</span>        {<a name="line.426"></a>
-<span class="sourceLineNo">427</span>            handleUnknownToken(currentToken);<a name="line.427"></a>
-<span class="sourceLineNo">428</span>        }<a name="line.428"></a>
-<span class="sourceLineNo">429</span>        else if (matchingOpts.size() &gt; 1)<a name="line.429"></a>
-<span class="sourceLineNo">430</span>        {<a name="line.430"></a>
-<span class="sourceLineNo">431</span>            throw new AmbiguousOptionException(opt, matchingOpts);<a name="line.431"></a>
-<span class="sourceLineNo">432</span>        }<a name="line.432"></a>
-<span class="sourceLineNo">433</span>        else<a name="line.433"></a>
-<span class="sourceLineNo">434</span>        {<a name="line.434"></a>
-<span class="sourceLineNo">435</span>            Option option = options.getOption(matchingOpts.get(0));<a name="line.435"></a>
+<span class="sourceLineNo">327</span>            return false;<a name="line.327"></a>
+<span class="sourceLineNo">328</span>        }<a name="line.328"></a>
+<span class="sourceLineNo">329</span><a name="line.329"></a>
+<span class="sourceLineNo">330</span>        int pos = token.indexOf("=");<a name="line.330"></a>
+<span class="sourceLineNo">331</span>        String t = pos == -1 ? token : token.substring(0, pos);<a name="line.331"></a>
+<span class="sourceLineNo">332</span><a name="line.332"></a>
+<span class="sourceLineNo">333</span>        if (!options.getMatchingOptions(t).isEmpty())<a name="line.333"></a>
+<span class="sourceLineNo">334</span>        {<a name="line.334"></a>
+<span class="sourceLineNo">335</span>            // long or partial long options (--L, -L, --L=V, -L=V, --l, --l=V)<a name="line.335"></a>
+<span class="sourceLineNo">336</span>            return true;<a name="line.336"></a>
+<span class="sourceLineNo">337</span>        }<a name="line.337"></a>
+<span class="sourceLineNo">338</span>        else if (getLongPrefix(token) != null &amp;&amp; !token.startsWith("--"))<a name="line.338"></a>
+<span class="sourceLineNo">339</span>        {<a name="line.339"></a>
+<span class="sourceLineNo">340</span>            // -LV<a name="line.340"></a>
+<span class="sourceLineNo">341</span>            return true;<a name="line.341"></a>
+<span class="sourceLineNo">342</span>        }<a name="line.342"></a>
+<span class="sourceLineNo">343</span><a name="line.343"></a>
+<span class="sourceLineNo">344</span>        return false;<a name="line.344"></a>
+<span class="sourceLineNo">345</span>    }<a name="line.345"></a>
+<span class="sourceLineNo">346</span><a name="line.346"></a>
+<span class="sourceLineNo">347</span>    /**<a name="line.347"></a>
+<span class="sourceLineNo">348</span>     * Handles an unknown token. If the token starts with a dash an <a name="line.348"></a>
+<span class="sourceLineNo">349</span>     * UnrecognizedOptionException is thrown. Otherwise the token is added <a name="line.349"></a>
+<span class="sourceLineNo">350</span>     * to the arguments of the command line. If the stopAtNonOption flag <a name="line.350"></a>
+<span class="sourceLineNo">351</span>     * is set, this stops the parsing and the remaining tokens are added <a name="line.351"></a>
+<span class="sourceLineNo">352</span>     * as-is in the arguments of the command line.<a name="line.352"></a>
+<span class="sourceLineNo">353</span>     *<a name="line.353"></a>
+<span class="sourceLineNo">354</span>     * @param token the command line token to handle<a name="line.354"></a>
+<span class="sourceLineNo">355</span>     */<a name="line.355"></a>
+<span class="sourceLineNo">356</span>    private void handleUnknownToken(String token) throws ParseException<a name="line.356"></a>
+<span class="sourceLineNo">357</span>    {<a name="line.357"></a>
+<span class="sourceLineNo">358</span>        if (token.startsWith("-") &amp;&amp; token.length() &gt; 1 &amp;&amp; !stopAtNonOption)<a name="line.358"></a>
+<span class="sourceLineNo">359</span>        {<a name="line.359"></a>
+<span class="sourceLineNo">360</span>            throw new UnrecognizedOptionException("Unrecognized option: " + token, token);<a name="line.360"></a>
+<span class="sourceLineNo">361</span>        }<a name="line.361"></a>
+<span class="sourceLineNo">362</span><a name="line.362"></a>
+<span class="sourceLineNo">363</span>        cmd.addArg(token);<a name="line.363"></a>
+<span class="sourceLineNo">364</span>        if (stopAtNonOption)<a name="line.364"></a>
+<span class="sourceLineNo">365</span>        {<a name="line.365"></a>
+<span class="sourceLineNo">366</span>            skipParsing = true;<a name="line.366"></a>
+<span class="sourceLineNo">367</span>        }<a name="line.367"></a>
+<span class="sourceLineNo">368</span>    }<a name="line.368"></a>
+<span class="sourceLineNo">369</span><a name="line.369"></a>
+<span class="sourceLineNo">370</span>    /**<a name="line.370"></a>
+<span class="sourceLineNo">371</span>     * Handles the following tokens:<a name="line.371"></a>
+<span class="sourceLineNo">372</span>     *<a name="line.372"></a>
+<span class="sourceLineNo">373</span>     * --L<a name="line.373"></a>
+<span class="sourceLineNo">374</span>     * --L=V<a name="line.374"></a>
+<span class="sourceLineNo">375</span>     * --L V<a name="line.375"></a>
+<span class="sourceLineNo">376</span>     * --l<a name="line.376"></a>
+<span class="sourceLineNo">377</span>     *<a name="line.377"></a>
+<span class="sourceLineNo">378</span>     * @param token the command line token to handle<a name="line.378"></a>
+<span class="sourceLineNo">379</span>     */<a name="line.379"></a>
+<span class="sourceLineNo">380</span>    private void handleLongOption(String token) throws ParseException<a name="line.380"></a>
+<span class="sourceLineNo">381</span>    {<a name="line.381"></a>
+<span class="sourceLineNo">382</span>        if (token.indexOf('=') == -1)<a name="line.382"></a>
+<span class="sourceLineNo">383</span>        {<a name="line.383"></a>
+<span class="sourceLineNo">384</span>            handleLongOptionWithoutEqual(token);<a name="line.384"></a>
+<span class="sourceLineNo">385</span>        }<a name="line.385"></a>
+<span class="sourceLineNo">386</span>        else<a name="line.386"></a>
+<span class="sourceLineNo">387</span>        {<a name="line.387"></a>
+<span class="sourceLineNo">388</span>            handleLongOptionWithEqual(token);<a name="line.388"></a>
+<span class="sourceLineNo">389</span>        }<a name="line.389"></a>
+<span class="sourceLineNo">390</span>    }<a name="line.390"></a>
+<span class="sourceLineNo">391</span><a name="line.391"></a>
+<span class="sourceLineNo">392</span>    /**<a name="line.392"></a>
+<span class="sourceLineNo">393</span>     * Handles the following tokens:<a name="line.393"></a>
+<span class="sourceLineNo">394</span>     *<a name="line.394"></a>
+<span class="sourceLineNo">395</span>     * --L<a name="line.395"></a>
+<span class="sourceLineNo">396</span>     * -L<a name="line.396"></a>
+<span class="sourceLineNo">397</span>     * --l<a name="line.397"></a>
+<span class="sourceLineNo">398</span>     * -l<a name="line.398"></a>
+<span class="sourceLineNo">399</span>     * <a name="line.399"></a>
+<span class="sourceLineNo">400</span>     * @param token the command line token to handle<a name="line.400"></a>
+<span class="sourceLineNo">401</span>     */<a name="line.401"></a>
+<span class="sourceLineNo">402</span>    private void handleLongOptionWithoutEqual(String token) throws ParseException<a name="line.402"></a>
+<span class="sourceLineNo">403</span>    {<a name="line.403"></a>
+<span class="sourceLineNo">404</span>        List&lt;String&gt; matchingOpts = options.getMatchingOptions(token);<a name="line.404"></a>
+<span class="sourceLineNo">405</span>        if (matchingOpts.isEmpty())<a name="line.405"></a>
+<span class="sourceLineNo">406</span>        {<a name="line.406"></a>
+<span class="sourceLineNo">407</span>            handleUnknownToken(currentToken);<a name="line.407"></a>
+<span class="sourceLineNo">408</span>        }<a name="line.408"></a>
+<span class="sourceLineNo">409</span>        else if (matchingOpts.size() &gt; 1)<a name="line.409"></a>
+<span class="sourceLineNo">410</span>        {<a name="line.410"></a>
+<span class="sourceLineNo">411</span>            throw new AmbiguousOptionException(token, matchingOpts);<a name="line.411"></a>
+<span class="sourceLineNo">412</span>        }<a name="line.412"></a>
+<span class="sourceLineNo">413</span>        else<a name="line.413"></a>
+<span class="sourceLineNo">414</span>        {<a name="line.414"></a>
+<span class="sourceLineNo">415</span>            handleOption(options.getOption(matchingOpts.get(0)));<a name="line.415"></a>
+<span class="sourceLineNo">416</span>        }<a name="line.416"></a>
+<span class="sourceLineNo">417</span>    }<a name="line.417"></a>
+<span class="sourceLineNo">418</span><a name="line.418"></a>
+<span class="sourceLineNo">419</span>    /**<a name="line.419"></a>
+<span class="sourceLineNo">420</span>     * Handles the following tokens:<a name="line.420"></a>
+<span class="sourceLineNo">421</span>     *<a name="line.421"></a>
+<span class="sourceLineNo">422</span>     * --L=V<a name="line.422"></a>
+<span class="sourceLineNo">423</span>     * -L=V<a name="line.423"></a>
+<span class="sourceLineNo">424</span>     * --l=V<a name="line.424"></a>
+<span class="sourceLineNo">425</span>     * -l=V<a name="line.425"></a>
+<span class="sourceLineNo">426</span>     *<a name="line.426"></a>
+<span class="sourceLineNo">427</span>     * @param token the command line token to handle<a name="line.427"></a>
+<span class="sourceLineNo">428</span>     */<a name="line.428"></a>
+<span class="sourceLineNo">429</span>    private void handleLongOptionWithEqual(String token) throws ParseException<a name="line.429"></a>
+<span class="sourceLineNo">430</span>    {<a name="line.430"></a>
+<span class="sourceLineNo">431</span>        int pos = token.indexOf('=');<a name="line.431"></a>
+<span class="sourceLineNo">432</span><a name="line.432"></a>
+<span class="sourceLineNo">433</span>        String value = token.substring(pos + 1);<a name="line.433"></a>
+<span class="sourceLineNo">434</span><a name="line.434"></a>
+<span class="sourceLineNo">435</span>        String opt = token.substring(0, pos);<a name="line.435"></a>
 <span class="sourceLineNo">436</span><a name="line.436"></a>
-<span class="sourceLineNo">437</span>            if (option.acceptsArg())<a name="line.437"></a>
-<span class="sourceLineNo">438</span>            {<a name="line.438"></a>
-<span class="sourceLineNo">439</span>                handleOption(option);<a name="line.439"></a>
-<span class="sourceLineNo">440</span>                currentOption.addValueForProcessing(value);<a name="line.440"></a>
-<span class="sourceLineNo">441</span>                currentOption = null;<a name="line.441"></a>
-<span class="sourceLineNo">442</span>            }<a name="line.442"></a>
-<span class="sourceLineNo">443</span>            else<a name="line.443"></a>
-<span class="sourceLineNo">444</span>            {<a name="line.444"></a>
-<span class="sourceLineNo">445</span>                handleUnknownToken(currentToken);<a name="line.445"></a>
-<span class="sourceLineNo">446</span>            }<a name="line.446"></a>
-<span class="sourceLineNo">447</span>        }<a name="line.447"></a>
-<span class="sourceLineNo">448</span>    }<a name="line.448"></a>
+<span class="sourceLineNo">437</span>        List&lt;String&gt; matchingOpts = options.getMatchingOptions(opt);<a name="line.437"></a>
+<span class="sourceLineNo">438</span>        if (matchingOpts.isEmpty())<a name="line.438"></a>
+<span class="sourceLineNo">439</span>        {<a name="line.439"></a>
+<span class="sourceLineNo">440</span>            handleUnknownToken(currentToken);<a name="line.440"></a>
+<span class="sourceLineNo">441</span>        }<a name="line.441"></a>
+<span class="sourceLineNo">442</span>        else if (matchingOpts.size() &gt; 1)<a name="line.442"></a>
+<span class="sourceLineNo">443</span>        {<a name="line.443"></a>
+<span class="sourceLineNo">444</span>            throw new AmbiguousOptionException(opt, matchingOpts);<a name="line.444"></a>
+<span class="sourceLineNo">445</span>        }<a name="line.445"></a>
+<span class="sourceLineNo">446</span>        else<a name="line.446"></a>
+<span class="sourceLineNo">447</span>        {<a name="line.447"></a>
+<span class="sourceLineNo">448</span>            Option option = options.getOption(matchingOpts.get(0));<a name="line.448"></a>
 <span class="sourceLineNo">449</span><a name="line.449"></a>
-<span class="sourceLineNo">450</span>    /**<a name="line.450"></a>
-<span class="sourceLineNo">451</span>     * Handles the following tokens:<a name="line.451"></a>
-<span class="sourceLineNo">452</span>     *<a name="line.452"></a>
-<span class="sourceLineNo">453</span>     * -S<a name="line.453"></a>
-<span class="sourceLineNo">454</span>     * -SV<a name="line.454"></a>
-<span class="sourceLineNo">455</span>     * -S V<a name="line.455"></a>
-<span class="sourceLineNo">456</span>     * -S=V<a name="line.456"></a>
-<span class="sourceLineNo">457</span>     * -S1S2<a name="line.457"></a>
-<span class="sourceLineNo">458</span>     * -S1S2 V<a name="line.458"></a>
-<span class="sourceLineNo">459</span>     * -SV1=V2<a name="line.459"></a>
-<span class="sourceLineNo">460</span>     *<a name="line.460"></a>
-<span class="sourceLineNo">461</span>     * -L<a name="line.461"></a>
-<span class="sourceLineNo">462</span>     * -LV<a name="line.462"></a>
-<span class="sourceLineNo">463</span>     * -L V<a name="line.463"></a>
-<span class="sourceLineNo">464</span>     * -L=V<a name="line.464"></a>
-<span class="sourceLineNo">465</span>     * -l<a name="line.465"></a>
-<span class="sourceLineNo">466</span>     *<a name="line.466"></a>
-<span class="sourceLineNo">467</span>     * @param token the command line token to handle<a name="line.467"></a>
-<span class="sourceLineNo">468</span>     */<a name="line.468"></a>
-<span class="sourceLineNo">469</span>    private void handleShortAndLongOption(String token) throws ParseException<a name="line.469"></a>
-<span class="sourceLineNo">470</span>    {<a name="line.470"></a>
-<span class="sourceLineNo">471</span>        String t = Util.stripLeadingHyphens(token);<a name="line.471"></a>
-<span class="sourceLineNo">472</span><a name="line.472"></a>
-<span class="sourceLineNo">473</span>        int pos = t.indexOf('=');<a name="line.473"></a>
-<span class="sourceLineNo">474</span><a name="line.474"></a>
-<span class="sourceLineNo">475</span>        if (t.length() == 1)<a name="line.475"></a>
-<span class="sourceLineNo">476</span>        {<a name="line.476"></a>
-<span class="sourceLineNo">477</span>            // -S<a name="line.477"></a>
-<span class="sourceLineNo">478</span>            if (options.hasShortOption(t))<a name="line.478"></a>
-<span class="sourceLineNo">479</span>            {<a name="line.479"></a>
-<span class="sourceLineNo">480</span>                handleOption(options.getOption(t));<a name="line.480"></a>
-<span class="sourceLineNo">481</span>            }<a name="line.481"></a>
-<span class="sourceLineNo">482</span>            else<a name="line.482"></a>
-<span class="sourceLineNo">483</span>            {<a name="line.483"></a>
-<span class="sourceLineNo">484</span>                handleUnknownToken(token);<a name="line.484"></a>
-<span class="sourceLineNo">485</span>            }<a name="line.485"></a>
-<span class="sourceLineNo">486</span>        }<a name="line.486"></a>
-<span class="sourceLineNo">487</span>        else if (pos == -1)<a name="line.487"></a>
-<span class="sourceLineNo">488</span>        {<a name="line.488"></a>
-<span class="sourceLineNo">489</span>            // no equal sign found (-xxx)<a name="line.489"></a>
-<span class="sourceLineNo">490</span>            if (options.hasShortOption(t))<a name="line.490"></a>
-<span class="sourceLineNo">491</span>            {<a name="line.491"></a>
-<span class="sourceLineNo">492</span>                handleOption(options.getOption(t));<a name="line.492"></a>
-<span class="sourceLineNo">493</span>            }<a name="line.493"></a>
-<span class="sourceLineNo">494</span>            else if (!options.getMatchingOptions(t).isEmpty())<a name="line.494"></a>
-<span class="sourceLineNo">495</span>            {<a name="line.495"></a>
-<span class="sourceLineNo">496</span>                // -L or -l<a name="line.496"></a>
-<span class="sourceLineNo">497</span>                handleLongOptionWithoutEqual(token);<a name="line.497"></a>
+<span class="sourceLineNo">450</span>            if (option.acceptsArg())<a name="line.450"></a>
+<span class="sourceLineNo">451</span>            {<a name="line.451"></a>
+<span class="sourceLineNo">452</span>                handleOption(option);<a name="line.452"></a>
+<span class="sourceLineNo">453</span>                currentOption.addValueForProcessing(value);<a name="line.453"></a>
+<span class="sourceLineNo">454</span>                currentOption = null;<a name="line.454"></a>
+<span class="sourceLineNo">455</span>            }<a name="line.455"></a>
+<span class="sourceLineNo">456</span>            else<a name="line.456"></a>
+<span class="sourceLineNo">457</span>            {<a name="line.457"></a>
+<span class="sourceLineNo">458</span>                handleUnknownToken(currentToken);<a name="line.458"></a>
+<span class="sourceLineNo">459</span>            }<a name="line.459"></a>
+<span class="sourceLineNo">460</span>        }<a name="line.460"></a>
+<span class="sourceLineNo">461</span>    }<a name="line.461"></a>
+<span class="sourceLineNo">462</span><a name="line.462"></a>
+<span class="sourceLineNo">463</span>    /**<a name="line.463"></a>
+<span class="sourceLineNo">464</span>     * Handles the following tokens:<a name="line.464"></a>
+<span class="sourceLineNo">465</span>     *<a name="line.465"></a>
+<span class="sourceLineNo">466</span>     * -S<a name="line.466"></a>
+<span class="sourceLineNo">467</span>     * -SV<a name="line.467"></a>
+<span class="sourceLineNo">468</span>     * -S V<a name="line.468"></a>
+<span class="sourceLineNo">469</span>     * -S=V<a name="line.469"></a>
+<span class="sourceLineNo">470</span>     * -S1S2<a name="line.470"></a>
+<span class="sourceLineNo">471</span>     * -S1S2 V<a name="line.471"></a>
+<span class="sourceLineNo">472</span>     * -SV1=V2<a name="line.472"></a>
+<span class="sourceLineNo">473</span>     *<a name="line.473"></a>
+<span class="sourceLineNo">474</span>     * -L<a name="line.474"></a>
+<span class="sourceLineNo">475</span>     * -LV<a name="line.475"></a>
+<span class="sourceLineNo">476</span>     * -L V<a name="line.476"></a>
+<span class="sourceLineNo">477</span>     * -L=V<a name="line.477"></a>
+<span class="sourceLineNo">478</span>     * -l<a name="line.478"></a>
+<span class="sourceLineNo">479</span>     *<a name="line.479"></a>
+<span class="sourceLineNo">480</span>     * @param token the command line token to handle<a name="line.480"></a>
+<span class="sourceLineNo">481</span>     */<a name="line.481"></a>
+<span class="sourceLineNo">482</span>    private void handleShortAndLongOption(String token) throws ParseException<a name="line.482"></a>
+<span class="sourceLineNo">483</span>    {<a name="line.483"></a>
+<span class="sourceLineNo">484</span>        String t = Util.stripLeadingHyphens(token);<a name="line.484"></a>
+<span class="sourceLineNo">485</span><a name="line.485"></a>
+<span class="sourceLineNo">486</span>        int pos = t.indexOf('=');<a name="line.486"></a>
+<span class="sourceLineNo">487</span><a name="line.487"></a>
+<span class="sourceLineNo">488</span>        if (t.length() == 1)<a name="line.488"></a>
+<span class="sourceLineNo">489</span>        {<a name="line.489"></a>
+<span class="sourceLineNo">490</span>            // -S<a name="line.490"></a>
+<span class="sourceLineNo">491</span>            if (options.hasShortOption(t))<a name="line.491"></a>
+<span class="sourceLineNo">492</span>            {<a name="line.492"></a>
+<span class="sourceLineNo">493</span>                handleOption(options.getOption(t));<a name="line.493"></a>
+<span class="sourceLineNo">494</span>            }<a name="line.494"></a>
+<span class="sourceLineNo">495</span>            else<a name="line.495"></a>
+<span class="sourceLineNo">496</span>            {<a name="line.496"></a>
+<span class="sourceLineNo">497</span>                handleUnknownToken(token);<a name="line.497"></a>
 <span class="sourceLineNo">498</span>            }<a name="line.498"></a>
-<span class="sourceLineNo">499</span>            else<a name="line.499"></a>
-<span class="sourceLineNo">500</span>            {<a name="line.500"></a>
-<span class="sourceLineNo">501</span>                // look for a long prefix (-Xmx512m)<a name="line.501"></a>
-<span class="sourceLineNo">502</span>                String opt = getLongPrefix(t);<a name="line.502"></a>
-<span class="sourceLineNo">503</span><a name="line.503"></a>
-<span class="sourceLineNo">504</span>                if (opt != null &amp;&amp; options.getOption(opt).acceptsArg())<a name="line.504"></a>
-<span class="sourceLineNo">505</span>                {<a name="line.505"></a>
-<span class="sourceLineNo">506</span>                    handleOption(options.getOption(opt));<a name="line.506"></a>
-<span class="sourceLineNo">507</span>                    currentOption.addValueForProcessing(t.substring(opt.length()));<a name="line.507"></a>
-<span class="sourceLineNo">508</span>                    currentOption = null;<a name="line.508"></a>
-<span class="sourceLineNo">509</span>                }<a name="line.509"></a>
-<span class="sourceLineNo">510</span>                else if (isJavaProperty(t))<a name="line.510"></a>
-<span class="sourceLineNo">511</span>                {<a name="line.511"></a>
-<span class="sourceLineNo">512</span>                    // -SV1 (-Dflag)<a name="line.512"></a>
-<span class="sourceLineNo">513</span>                    handleOption(options.getOption(t.substring(0, 1)));<a name="line.513"></a>
-<span class="sourceLineNo">514</span>                    currentOption.addValueForProcessing(t.substring(1));<a name="line.514"></a>
-<span class="sourceLineNo">515</span>                    currentOption = null;<a name="line.515"></a>
-<span class="sourceLineNo">516</span>                }<a name="line.516"></a>
-<span class="sourceLineNo">517</span>                else<a name="line.517"></a>
+<span class="sourceLineNo">499</span>        }<a name="line.499"></a>
+<span class="sourceLineNo">500</span>        else if (pos == -1)<a name="line.500"></a>
+<span class="sourceLineNo">501</span>        {<a name="line.501"></a>
+<span class="sourceLineNo">502</span>            // no equal sign found (-xxx)<a name="line.502"></a>
+<span class="sourceLineNo">503</span>            if (options.hasShortOption(t))<a name="line.503"></a>
+<span class="sourceLineNo">504</span>            {<a name="line.504"></a>
+<span class="sourceLineNo">505</span>                handleOption(options.getOption(t));<a name="line.505"></a>
+<span class="sourceLineNo">506</span>            }<a name="line.506"></a>
+<span class="sourceLineNo">507</span>            else if (!options.getMatchingOptions(t).isEmpty())<a name="line.507"></a>
+<span class="sourceLineNo">508</span>            {<a name="line.508"></a>
+<span class="sourceLineNo">509</span>                // -L or -l<a name="line.509"></a>
+<span class="sourceLineNo">510</span>                handleLongOptionWithoutEqual(token);<a name="line.510"></a>
+<span class="sourceLineNo">511</span>            }<a name="line.511"></a>
+<span class="sourceLineNo">512</span>            else<a name="line.512"></a>
+<span class="sourceLineNo">513</span>            {<a name="line.513"></a>
+<span class="sourceLineNo">514</span>                // look for a long prefix (-Xmx512m)<a name="line.514"></a>
+<span class="sourceLineNo">515</span>                String opt = getLongPrefix(t);<a name="line.515"></a>
+<span class="sourceLineNo">516</span><a name="line.516"></a>
+<span class="sourceLineNo">517</span>                if (opt != null &amp;&amp; options.getOption(opt).acceptsArg())<a name="line.517"></a>
 <span class="sourceLineNo">518</span>                {<a name="line.518"></a>
-<span class="sourceLineNo">519</span>                    // -S1S2S3 or -S1S2V<a name="line.519"></a>
-<span class="sourceLineNo">520</span>                    handleConcatenatedOptions(token);<a name="line.520"></a>
-<span class="sourceLineNo">521</span>                }<a name="line.521"></a>
-<span class="sourceLineNo">522</span>            }<a name="line.522"></a>
-<span class="sourceLineNo">523</span>        }<a name="line.523"></a>
-<span class="sourceLineNo">524</span>        else<a name="line.524"></a>
-<span class="sourceLineNo">525</span>        {<a name="line.525"></a>
-<span class="sourceLineNo">526</span>            // equal sign found (-xxx=yyy)<a name="line.526"></a>
-<span class="sourceLineNo">527</span>            String opt = t.substring(0, pos);<a name="line.527"></a>
-<span class="sourceLineNo">528</span>            String value = t.substring(pos + 1);<a name="line.528"></a>
-<span class="sourceLineNo">529</span><a name="line.529"></a>
-<span class="sourceLineNo">530</span>            if (opt.length() == 1)<a name="line.530"></a>
-<span class="sourceLineNo">531</span>            {<a name="line.531"></a>
-<span class="sourceLineNo">532</span>                // -S=V<a name="line.532"></a>
-<span class="sourceLineNo">533</span>                Option option = options.getOption(opt);<a name="line.533"></a>
-<span class="sourceLineNo">534</span>                if (option != null &amp;&amp; option.acceptsArg())<a name="line.534"></a>
-<span class="sourceLineNo">535</span>                {<a name="line.535"></a>
-<span class="sourceLineNo">536</span>                    handleOption(option);<a name="line.536"></a>
-<span class="sourceLineNo">537</span>                    currentOption.addValueForProcessing(value);<a name="line.537"></a>
-<span class="sourceLineNo">538</span>                    currentOption = null;<a name="line.538"></a>
-<span class="sourceLineNo">539</span>                }<a name="line.539"></a>
-<span class="sourceLineNo">540</span>                else<a name="line.540"></a>
-<span class="sourceLineNo">541</span>                {<a name="line.541"></a>
-<span class="sourceLineNo">542</span>                    handleUnknownToken(token);<a name="line.542"></a>
-<span class="sourceLineNo">543</span>                }<a name="line.543"></a>
-<span class="sourceLineNo">544</span>            }<a name="line.544"></a>
-<span class="sourceLineNo">545</span>            else if (isJavaProperty(opt))<a name="line.545"></a>
-<span class="sourceLineNo">546</span>            {<a name="line.546"></a>
-<span class="sourceLineNo">547</span>                // -SV1=V2 (-Dkey=value)<a name="line.547"></a>
-<span class="sourceLineNo">548</span>                handleOption(options.getOption(opt.substring(0, 1)));<a name="line.548"></a>
-<span class="sourceLineNo">549</span>                currentOption.addValueForProcessing(opt.substring(1));<a name="line.549"></a>
-<span class="sourceLineNo">550</span>                currentOption.addValueForProcessing(value);<a name="line.550"></a>
-<span class="sourceLineNo">551</span>                currentOption = null;<a name="line.551"></a>
-<span class="sourceLineNo">552</span>            }<a name="line.552"></a>
-<span class="sourceLineNo">553</span>            else<a name="line.553"></a>
-<span class="sourceLineNo">554</span>            {<a name="line.554"></a>
-<span class="sourceLineNo">555</span>                // -L=V or -l=V<a name="line.555"></a>
-<span class="sourceLineNo">556</span>                handleLongOptionWithEqual(token);<a name="line.556"></a>
+<span class="sourceLineNo">519</span>                    handleOption(options.getOption(opt));<a name="line.519"></a>
+<span class="sourceLineNo">520</span>                    currentOption.addValueForProcessing(t.substring(opt.length()));<a name="line.520"></a>
+<span class="sourceLineNo">521</span>                    currentOption = null;<a name="line.521"></a>
+<span class="sourceLineNo">522</span>                }<a name="line.522"></a>
+<span class="sourceLineNo">523</span>                else if (isJavaProperty(t))<a name="line.523"></a>
+<span class="sourceLineNo">524</span>                {<a name="line.524"></a>
+<span class="sourceLineNo">525</span>                    // -SV1 (-Dflag)<a name="line.525"></a>
+<span class="sourceLineNo">526</span>                    handleOption(options.getOption(t.substring(0, 1)));<a name="line.526"></a>
+<span class="sourceLineNo">527</span>                    currentOption.addValueForProcessing(t.substring(1));<a name="line.527"></a>
+<span class="sourceLineNo">528</span>                    currentOption = null;<a name="line.528"></a>
+<span class="sourceLineNo">529</span>                }<a name="line.529"></a>
+<span class="sourceLineNo">530</span>                else<a name="line.530"></a>
+<span class="sourceLineNo">531</span>                {<a name="line.531"></a>
+<span class="sourceLineNo">532</span>                    // -S1S2S3 or -S1S2V<a name="line.532"></a>
+<span class="sourceLineNo">533</span>                    handleConcatenatedOptions(token);<a name="line.533"></a>
+<span class="sourceLineNo">534</span>                }<a name="line.534"></a>
+<span class="sourceLineNo">535</span>            }<a name="line.535"></a>
+<span class="sourceLineNo">536</span>        }<a name="line.536"></a>
+<span class="sourceLineNo">537</span>        else<a name="line.537"></a>
+<span class="sourceLineNo">538</span>        {<a name="line.538"></a>
+<span class="sourceLineNo">539</span>            // equal sign found (-xxx=yyy)<a name="line.539"></a>
+<span class="sourceLineNo">540</span>            String opt = t.substring(0, pos);<a name="line.540"></a>
+<span class="sourceLineNo">541</span>            String value = t.substring(pos + 1);<a name="line.541"></a>
+<span class="sourceLineNo">542</span><a name="line.542"></a>
+<span class="sourceLineNo">543</span>            if (opt.length() == 1)<a name="line.543"></a>
+<span class="sourceLineNo">544</span>            {<a name="line.544"></a>
+<span class="sourceLineNo">545</span>                // -S=V<a name="line.545"></a>
+<span class="sourceLineNo">546</span>                Option option = options.getOption(opt);<a name="line.546"></a>
+<span class="sourceLineNo">547</span>                if (option != null &amp;&amp; option.acceptsArg())<a name="line.547"></a>
+<span class="sourceLineNo">548</span>                {<a name="line.548"></a>
+<span class="sourceLineNo">549</span>                    handleOption(option);<a name="line.549"></a>
+<span class="sourceLineNo">550</span>                    currentOption.addValueForProcessing(value);<a name="line.550"></a>
+<span class="sourceLineNo">551</span>                    currentOption = null;<a name="line.551"></a>
+<span class="sourceLineNo">552</span>                }<a name="line.552"></a>
+<span class="sourceLineNo">553</span>                else<a name="line.553"></a>
+<span class="sourceLineNo">554</span>                {<a name="line.554"></a>
+<span class="sourceLineNo">555</span>                    handleUnknownToken(token);<a name="line.555"></a>
+<span class="sourceLineNo">556</span>                }<a name="line.556"></a>
 <span class="sourceLineNo">557</span>            }<a name="line.557"></a>
-<span class="sourceLineNo">558</span>        }<a name="line.558"></a>
-<span class="sourceLineNo">559</span>    }<a name="line.559"></a>
-<span class="sourceLineNo">560</span><a name="line.560"></a>
-<span class="sourceLineNo">561</span>    /**<a name="line.561"></a>
-<span class="sourceLineNo">562</span>     * Search for a prefix that is the long name of an option (-Xmx512m)<a name="line.562"></a>
-<span class="sourceLineNo">563</span>     *<a name="line.563"></a>
-<span class="sourceLineNo">564</span>     * @param token<a name="line.564"></a>
-<span class="sourceLineNo">565</span>     */<a name="line.565"></a>
-<span class="sourceLineNo">566</span>    private String getLongPrefix(String token)<a name="line.566"></a>
-<span class="sourceLineNo">567</span>    {<a name="line.567"></a>
-<span class="sourceLineNo">568</span>        String t = Util.stripLeadingHyphens(token);<a name="line.568"></a>
-<span class="sourceLineNo">569</span><a name="line.569"></a>
-<span class="sourceLineNo">570</span>        int i;<a name="line.570"></a>
-<span class="sourceLineNo">571</span>        String opt = null;<a name="line.571"></a>
-<span class="sourceLineNo">572</span>        for (i = t.length() - 2; i &gt; 1; i--)<a name="line.572"></a>
-<span class="sourceLineNo">573</span>        {<a name="line.573"></a>
-<span class="sourceLineNo">574</span>            String prefix = t.substring(0, i);<a name="line.574"></a>
-<span class="sourceLineNo">575</span>            if (options.hasLongOption(prefix))<a name="line.575"></a>
-<span class="sourceLineNo">576</span>            {<a name="line.576"></a>
-<span class="sourceLineNo">577</span>                opt = prefix;<a name="line.577"></a>
-<span class="sourceLineNo">578</span>                break;<a name="line.578"></a>
-<span class="sourceLineNo">579</span>            }<a name="line.579"></a>
-<span class="sourceLineNo">580</span>        }<a name="line.580"></a>
-<span class="sourceLineNo">581</span>        <a name="line.581"></a>
-<span class="sourceLineNo">582</span>        return opt;<a name="line.582"></a>
-<span class="sourceLineNo">583</span>    }<a name="line.583"></a>
-<span class="sourceLineNo">584</span><a name="line.584"></a>
-<span class="sourceLineNo">585</span>    /**<a name="line.585"></a>
-<span class="sourceLineNo">586</span>     * Check if the specified token is a Java-like property (-Dkey=value).<a name="line.586"></a>
-<span class="sourceLineNo">587</span>     */<a name="line.587"></a>
-<span class="sourceLineNo">588</span>    private boolean isJavaProperty(String token)<a name="line.588"></a>
-<span class="sourceLineNo">589</span>    {<a name="line.589"></a>
-<span class="sourceLineNo">590</span>        String opt = token.substring(0, 1);<a name="line.590"></a>
-<span class="sourceLineNo">591</span>        Option option = options.getOption(opt);<a name="line.591"></a>
-<span class="sourceLineNo">592</span><a name="line.592"></a>
-<span class="sourceLineNo">593</span>        return option != null &amp;&amp; (option.getArgs() &gt;= 2 || option.getArgs() == Option.UNLIMITED_VALUES);<a name="line.593"></a>
-<span class="sourceLineNo">594</span>    }<a name="line.594"></a>
-<span class="sourceLineNo">595</span><a name="line.595"></a>
-<span class="sourceLineNo">596</span>    private void handleOption(Option option) throws ParseException<a name="line.596"></a>
-<span class="sourceLineNo">597</span>    {<a name="line.597"></a>
-<span class="sourceLineNo">598</span>        // check the previous option before handling the next one<a name="line.598"></a>
-<span class="sourceLineNo">599</span>        checkRequiredArgs();<a name="line.599"></a>
-<span class="sourceLineNo">600</span><a name="line.600"></a>
-<span class="sourceLineNo">601</span>        option = (Option) option.clone();<a name="line.601"></a>
-<span class="sourceLineNo">602</span><a name="line.602"></a>
-<span class="sourceLineNo">603</span>        updateRequiredOptions(option);<a name="line.603"></a>
-<span class="sourceLineNo">604</span><a name="line.604"></a>
-<span class="sourceLineNo">605</span>        cmd.addOption(option);<a name="line.605"></a>
-<span class="sourceLineNo">606</span><a name="line.606"></a>
-<span class="sourceLineNo">607</span>        if (option.hasArg())<a name="line.607"></a>
-<span class="sourceLineNo">608</span>        {<a name="line.608"></a>
-<span class="sourceLineNo">609</span>            currentOption = option;<a name="line.609"></a>
-<span class="sourceLineNo">610</span>        }<a name="line.610"></a>
-<span class="sourceLineNo">611</span>        else<a name="line.611"></a>
-<span class="sourceLineNo">612</span>        {<a name="line.612"></a>
-<span class="sourceLineNo">613</span>            currentOption = null;<a name="line.613"></a>
-<span class="sourceLineNo">614</span>        }<a name="line.614"></a>
-<span class="sourceLineNo">615</span>    }<a name="line.615"></a>
-<span class="sourceLineNo">616</span><a name="line.616"></a>
-<span class="sourceLineNo">617</span>    /**<a name="line.617"></a>
-<span class="sourceLineNo">618</span>     * Removes the option or its group from the list of expected elements.<a name="line.618"></a>
-<span class="sourceLineNo">619</span>     *<a name="line.619"></a>
-<span class="sourceLineNo">620</span>     * @param option<a name="line.620"></a>
-<span class="sourceLineNo">621</span>     */<a name="line.621"></a>
-<span class="sourceLineNo">622</span>    private void updateRequiredOptions(Option option) throws AlreadySelectedException<a name="line.622"></a>
-<span class="sourceLineNo">623</span>    {<a name="line.623"></a>
-<span class="sourceLineNo">624</span>        if (option.isRequired())<a name="line.624"></a>
+<span class="sourceLineNo">558</span>            else if (isJavaProperty(opt))<a name="line.558"></a>
+<span class="sourceLineNo">559</span>            {<a name="line.559"></a>
+<span class="sourceLineNo">560</span>                // -SV1=V2 (-Dkey=value)<a name="line.560"></a>
+<span class="sourceLineNo">561</span>                handleOption(options.getOption(opt.substring(0, 1)));<a name="line.561"></a>
+<span class="sourceLineNo">562</span>                currentOption.addValueForProcessing(opt.substring(1));<a name="line.562"></a>
+<span class="sourceLineNo">563</span>                currentOption.addValueForProcessing(value);<a name="line.563"></a>
+<span class="sourceLineNo">564</span>                currentOption = null;<a name="line.564"></a>
+<span class="sourceLineNo">565</span>            }<a name="line.565"></a>
+<span class="sourceLineNo">566</span>            else<a name="line.566"></a>
+<span class="sourceLineNo">567</span>            {<a name="line.567"></a>
+<span class="sourceLineNo">568</span>                // -L=V or -l=V<a name="line.568"></a>
+<span class="sourceLineNo">569</span>                handleLongOptionWithEqual(token);<a name="line.569"></a>
+<span class="sourceLineNo">570</span>            }<a name="line.570"></a>
+<span class="sourceLineNo">571</span>        }<a name="line.571"></a>
+<span class="sourceLineNo">572</span>    }<a name="line.572"></a>
+<span class="sourceLineNo">573</span><a name="line.573"></a>
+<span class="sourceLineNo">574</span>    /**<a name="line.574"></a>
+<span class="sourceLineNo">575</span>     * Search for a prefix that is the long name of an option (-Xmx512m)<a name="line.575"></a>
+<span class="sourceLineNo">576</span>     *<a name="line.576"></a>
+<span class="sourceLineNo">577</span>     * @param token<a name="line.577"></a>
+<span class="sourceLineNo">578</span>     */<a name="line.578"></a>
+<span class="sourceLineNo">579</span>    private String getLongPrefix(String token)<a name="line.579"></a>
+<span class="sourceLineNo">580</span>    {<a name="line.580"></a>
+<span class="sourceLineNo">581</span>        String t = Util.stripLeadingHyphens(token);<a name="line.581"></a>
+<span class="sourceLineNo">582</span><a name="line.582"></a>
+<span class="sourceLineNo">583</span>        int i;<a name="line.583"></a>
+<span class="sourceLineNo">584</span>        String opt = null;<a name="line.584"></a>
+<span class="sourceLineNo">585</span>        for (i = t.length() - 2; i &gt; 1; i--)<a name="line.585"></a>
+<span class="sourceLineNo">586</span>        {<a name="line.586"></a>
+<span class="sourceLineNo">587</span>            String prefix = t.substring(0, i);<a name="line.587"></a>
+<span class="sourceLineNo">588</span>            if (options.hasLongOption(prefix))<a name="line.588"></a>
+<span class="sourceLineNo">589</span>            {<a name="line.589"></a>
+<span class="sourceLineNo">590</span>                opt = prefix;<a name="line.590"></a>
+<span class="sourceLineNo">591</span>                break;<a name="line.591"></a>
+<span class="sourceLineNo">592</span>            }<a name="line.592"></a>
+<span class="sourceLineNo">593</span>        }<a name="line.593"></a>
+<span class="sourceLineNo">594</span>        <a name="line.594"></a>
+<span class="sourceLineNo">595</span>        return opt;<a name="line.595"></a>
+<span class="sourceLineNo">596</span>    }<a name="line.596"></a>
+<span class="sourceLineNo">597</span><a name="line.597"></a>
+<span class="sourceLineNo">598</span>    /**<a name="line.598"></a>
+<span class="sourceLineNo">599</span>     * Check if the specified token is a Java-like property (-Dkey=value).<a name="line.599"></a>
+<span class="sourceLineNo">600</span>     */<a name="line.600"></a>
+<span class="sourceLineNo">601</span>    private boolean isJavaProperty(String token)<a name="line.601"></a>
+<span class="sourceLineNo">602</span>    {<a name="line.602"></a>
+<span class="sourceLineNo">603</span>        String opt = token.substring(0, 1);<a name="line.603"></a>
+<span class="sourceLineNo">604</span>        Option option = options.getOption(opt);<a name="line.604"></a>
+<span class="sourceLineNo">605</span><a name="line.605"></a>
+<span class="sourceLineNo">606</span>        return option != null &amp;&amp; (option.getArgs() &gt;= 2 || option.getArgs() == Option.UNLIMITED_VALUES);<a name="line.606"></a>
+<span class="sourceLineNo">607</span>    }<a name="line.607"></a>
+<span class="sourceLineNo">608</span><a name="line.608"></a>
+<span class="sourceLineNo">609</span>    private void handleOption(Option option) throws ParseException<a name="line.609"></a>
+<span class="sourceLineNo">610</span>    {<a name="line.610"></a>
+<span class="sourceLineNo">611</span>        // check the previous option before handling the next one<a name="line.611"></a>
+<span class="sourceLineNo">612</span>        checkRequiredArgs();<a name="line.612"></a>
+<span class="sourceLineNo">613</span><a name="line.613"></a>
+<span class="sourceLineNo">614</span>        option = (Option) option.clone();<a name="line.614"></a>
+<span class="sourceLineNo">615</span><a name="line.615"></a>
+<span class="sourceLineNo">616</span>        updateRequiredOptions(option);<a name="line.616"></a>
+<span class="sourceLineNo">617</span><a name="line.617"></a>
+<span class="sourceLineNo">618</span>        cmd.addOption(option);<a name="line.618"></a>
+<span class="sourceLineNo">619</span><a name="line.619"></a>
+<span class="sourceLineNo">620</span>        if (option.hasArg())<a name="line.620"></a>
+<span class="sourceLineNo">621</span>        {<a name="line.621"></a>
+<span class="sourceLineNo">622</span>            currentOption = option;<a name="line.622"></a>
+<span class="sourceLineNo">623</span>        }<a name="line.623"></a>
+<span class="sourceLineNo">624</span>        else<a name="line.624"></a>
 <span class="sourceLineNo">625</span>        {<a name="line.625"></a>
-<span class="sourceLineNo">626</span>            expectedOpts.remove(option.getKey());<a name="line.626"></a>
+<span class="sourceLineNo">626</span>            currentOption = null;<a name="line.626"></a>
 <span class="sourceLineNo">627</span>        }<a name="line.627"></a>
-<span class="sourceLineNo">628</span><a name="line.628"></a>
-<span class="sourceLineNo">629</span>        // if the option is in an OptionGroup make that option the selected option of the group<a name="line.629"></a>
-<span class="sourceLineNo">630</span>        if (options.getOptionGroup(option) != null)<a name="line.630"></a>
-<span class="sourceLineNo">631</span>        {<a name="line.631"></a>
-<span class="sourceLineNo">632</span>            OptionGroup group = options.getOptionGroup(option);<a name="line.632"></a>
-<span class="sourceLineNo">633</span><a name="line.633"></a>
-<span class="sourceLineNo">634</span>            if (group.isRequired())<a name="line.634"></a>
-<span class="sourceLineNo">635</span>            {<a name="line.635"></a>
-<span class="sourceLineNo">636</span>                expectedOpts.remove(group);<a name="line.636"></a>
-<span class="sourceLineNo">637</span>            }<a name="line.637"></a>
-<span class="sourceLineNo">638</span><a name="line.638"></a>
-<span class="sourceLineNo">639</span>            group.setSelected(option);<a name="line.639"></a>
+<span class="sourceLineNo">628</span>    }<a name="line.628"></a>
+<span class="sourceLineNo">629</span><a name="line.629"></a>
+<span class="sourceLineNo">630</span>    /**<a name="line.630"></a>
+<span class="sourceLineNo">631</span>     * Removes the option or its group from the list of expected elements.<a name="line.631"></a>
+<span class="sourceLineNo">632</span>     *<a name="line.632"></a>
+<span class="sourceLineNo">633</span>     * @param option<a name="line.633"></a>
+<span class="sourceLineNo">634</span>     */<a name="line.634"></a>
+<span class="sourceLineNo">635</span>    private void updateRequiredOptions(Option option) throws AlreadySelectedException<a name="line.635"></a>
+<span class="sourceLineNo">636</span>    {<a name="line.636"></a>
+<span class="sourceLineNo">637</span>        if (option.isRequired())<a name="line.637"></a>
+<span class="sourceLineNo">638</span>        {<a name="line.638"></a>
+<span class="sourceLineNo">639</span>            expectedOpts.remove(option.getKey());<a name="line.639"></a>
 <span class="sourceLineNo">640</span>        }<a name="line.640"></a>
-<span class="sourceLineNo">641</span>    }<a name="line.641"></a>
-<span class="sourceLineNo">642</span><a name="line.642"></a>
-<span class="sourceLineNo">643</span>    /**<a name="line.643"></a>
-<span class="sourceLineNo">644</span>     * Breaks &lt;code&gt;token&lt;/code&gt; into its constituent parts<a name="line.644"></a>
-<span class="sourceLineNo">645</span>     * using the following algorithm.<a name="line.645"></a>
-<span class="sourceLineNo">646</span>     *<a name="line.646"></a>
-<span class="sourceLineNo">647</span>     * &lt;ul&gt;<a name="line.647"></a>
-<span class="sourceLineNo">648</span>     *  &lt;li&gt;ignore the first character ("&lt;b&gt;-&lt;/b&gt;")&lt;/li&gt;<a name="line.648"></a>
-<span class="sourceLineNo">649</span>     *  &lt;li&gt;foreach remaining character check if an {@link Option}<a name="line.649"></a>
-<span class="sourceLineNo">650</span>     *  exists with that id.&lt;/li&gt;<a name="line.650"></a>
-<span class="sourceLineNo">651</span>     *  &lt;li&gt;if an {@link Option} does exist then add that character<a name="line.651"></a>
-<span class="sourceLineNo">652</span>     *  prepended with "&lt;b&gt;-&lt;/b&gt;" to the list of processed tokens.&lt;/li&gt;<a name="line.652"></a>
-<span class="sourceLineNo">653</span>     *  &lt;li&gt;if the {@link Option} can have an argument value and there<a name="line.653"></a>
-<span class="sourceLineNo">654</span>     *  are remaining characters in the token then add the remaining<a name="line.654"></a>
-<span class="sourceLineNo">655</span>     *  characters as a token to the list of processed tokens.&lt;/li&gt;<a name="line.655"></a>
-<span class="sourceLineNo">656</span>     *  &lt;li&gt;if an {@link Option} does &lt;b&gt;NOT&lt;/b&gt; exist &lt;b&gt;AND&lt;/b&gt;<a name="line.656"></a>
-<span class="sourceLineNo">657</span>     *  &lt;code&gt;stopAtNonOption&lt;/code&gt; &lt;b&gt;IS&lt;/b&gt; set then add the special token<a name="line.657"></a>
-<span class="sourceLineNo">658</span>     *  "&lt;b&gt;--&lt;/b&gt;" followed by the remaining characters and also<a name="line.658"></a>
-<span class="sourceLineNo">659</span>     *  the remaining tokens directly to the processed tokens list.&lt;/li&gt;<a name="line.659"></a>
-<span class="sourceLineNo">660</span>     *  &lt;li&gt;if an {@link Option} does &lt;b&gt;NOT&lt;/b&gt; exist &lt;b&gt;AND&lt;/b&gt;<a name="line.660"></a>
-<span class="sourceLineNo">661</span>     *  &lt;code&gt;stopAtNonOption&lt;/code&gt; &lt;b&gt;IS NOT&lt;/b&gt; set then add that<a name="line.661"></a>
-<span class="sourceLineNo">662</span>     *  character prepended with "&lt;b&gt;-&lt;/b&gt;".&lt;/li&gt;<a name="line.662"></a>
-<span class="sourceLineNo">663</span>     * &lt;/ul&gt;<a name="line.663"></a>
-<span class="sourceLineNo">664</span>     *<a name="line.664"></a>
-<span class="sourceLineNo">665</span>     * @param token The current token to be &lt;b&gt;burst&lt;/b&gt;<a name="line.665"></a>
-<span class="sourceLineNo">666</span>     * at the first non-Option encountered.<a name="line.666"></a>
-<span class="sourceLineNo">667</span>     * @throws ParseException if there are any problems encountered<a name="line.667"></a>
-<span class="sourceLineNo">668</span>     *                        while parsing the command line token.<a name="line.668"></a>
-<span class="sourceLineNo">669</span>     */<a name="line.669"></a>
-<span class="sourceLineNo">670</span>    protected void handleConcatenatedOptions(String token) throws ParseException<a name="line.670"></a>
-<span class="sourceLineNo">671</span>    {<a name="line.671"></a>
-<span class="sourceLineNo">672</span>        for (int i = 1; i &lt; token.length(); i++)<a name="line.672"></a>
-<span class="sourceLineNo">673</span>        {<a name="line.673"></a>
-<span class="sourceLineNo">674</span>            String ch = String.valueOf(token.charAt(i));<a name="line.674"></a>
-<span class="sourceLineNo">675</span><a name="line.675"></a>
-<span class="sourceLineNo">676</span>            if (options.hasOption(ch))<a name="line.676"></a>
-<span class="sourceLineNo">677</span>            {<a name="line.677"></a>
-<span class="sourceLineNo">678</span>                handleOption(options.getOption(ch));<a name="line.678"></a>
-<span class="sourceLineNo">679</span><a name="line.679"></a>
-<span class="sourceLineNo">680</span>                if (currentOption != null &amp;&amp; token.length() != i + 1)<a name="line.680"></a>
-<span class="sourceLineNo">681</span>                {<a name="line.681"></a>
-<span class="sourceLineNo">682</span>                    // add the trail as an argument of the option<a name="line.682"></a>
-<span class="sourceLineNo">683</span>                    currentOption.addValueForProcessing(token.substring(i + 1));<a name="line.683"></a>
-<span class="sourceLineNo">684</span>                    break;<a name="line.684"></a>
-<span class="sourceLineNo">685</span>                }<a name="line.685"></a>
-<span class="sourceLineNo">686</span>            }<a name="line.686"></a>
-<span class="sourceLineNo">687</span>            else<a name="line.687"></a>
-<span class="sourceLineNo">688</span>            {<a name="line.688"></a>
-<span class="sourceLineNo">689</span>                handleUnknownToken(stopAtNonOption &amp;&amp; i &gt; 1 ? token.substring(i) : token);<a name="line.689"></a>
-<span class="sourceLineNo">690</span>                break;<a name="line.690"></a>
-<span class="sourceLineNo">691</span>            }<a name="line.691"></a>
-<span class="sourceLineNo">692</span>        }<a name="line.692"></a>
-<span class="sourceLineNo">693</span>    }<a name="line.693"></a>
-<span class="sourceLineNo">694</span>}<a name="line.694"></a>
+<span class="sourceLineNo">641</span><a name="line.641"></a>
+<span class="sourceLineNo">642</span>        // if the option is in an OptionGroup make that option the selected option of the group<a name="line.642"></a>
+<span class="sourceLineNo">643</span>        if (options.getOptionGroup(option) != null)<a name="line.643"></a>
+<span class="sourceLineNo">644</span>        {<a name="line.644"></a>
+<span class="sourceLineNo">645</span>            OptionGroup group = options.getOptionGroup(option);<a name="line.645"></a>
+<span class="sourceLineNo">646</span><a name="line.646"></a>
+<span class="sourceLineNo">647</span>            if (group.isRequired())<a name="line.647"></a>
+<span class="sourceLineNo">648</span>            {<a name="line.648"></a>
+<span class="sourceLineNo">649</span>                expectedOpts.remove(group);<a name="line.649"></a>
+<span class="sourceLineNo">650</span>            }<a name="line.650"></a>
+<span class="sourceLineNo">651</span><a name="line.651"></a>
+<span class="sourceLineNo">652</span>            group.setSelected(option);<a name="line.652"></a>
+<span class="sourceLineNo">653</span>        }<a name="line.653"></a>
+<span class="sourceLineNo">654</span>    }<a name="line.654"></a>
+<span class="sourceLineNo">655</span><a name="line.655"></a>
+<span class="sourceLineNo">656</span>    /**<a name="line.656"></a>
+<span class="sourceLineNo">657</span>     * Breaks &lt;code&gt;token&lt;/code&gt; into its constituent parts<a name="line.657"></a>
+<span class="sourceLineNo">658</span>     * using the following algorithm.<a name="line.658"></a>
+<span class="sourceLineNo">659</span>     *<a name="line.659"></a>
+<span class="sourceLineNo">660</span>     * &lt;ul&gt;<a name="line.660"></a>
+<span class="sourceLineNo">661</span>     *  &lt;li&gt;ignore the first character ("&lt;b&gt;-&lt;/b&gt;")&lt;/li&gt;<a name="line.661"></a>
+<span class="sourceLineNo">662</span>     *  &lt;li&gt;for each remaining character check if an {@link Option}<a name="line.662"></a>
+<span class="sourceLineNo">663</span>     *  exists with that id.&lt;/li&gt;<a name="line.663"></a>
+<span class="sourceLineNo">664</span>     *  &lt;li&gt;if an {@link Option} does exist then add that character<a name="line.664"></a>
+<span class="sourceLineNo">665</span>     *  prepended with "&lt;b&gt;-&lt;/b&gt;" to the list of processed tokens.&lt;/li&gt;<a name="line.665"></a>
+<span class="sourceLineNo">666</span>     *  &lt;li&gt;if the {@link Option} can have an argument value and there<a name="line.666"></a>
+<span class="sourceLineNo">667</span>     *  are remaining characters in the token then add the remaining<a name="line.667"></a>
+<span class="sourceLineNo">668</span>     *  characters as a token to the list of processed tokens.&lt;/li&gt;<a name="line.668"></a>
+<span class="sourceLineNo">669</span>     *  &lt;li&gt;if an {@link Option} does &lt;b&gt;NOT&lt;/b&gt; exist &lt;b&gt;AND&lt;/b&gt;<a name="line.669"></a>
+<span class="sourceLineNo">670</span>     *  &lt;code&gt;stopAtNonOption&lt;/code&gt; &lt;b&gt;IS&lt;/b&gt; set then add the special token<a name="line.670"></a>
+<span class="sourceLineNo">671</span>     *  "&lt;b&gt;--&lt;/b&gt;" followed by the remaining characters and also<a name="line.671"></a>
+<span class="sourceLineNo">672</span>     *  the remaining tokens directly to the processed tokens list.&lt;/li&gt;<a name="line.672"></a>
+<span class="sourceLineNo">673</span>     *  &lt;li&gt;if an {@link Option} does &lt;b&gt;NOT&lt;/b&gt; exist &lt;b&gt;AND&lt;/b&gt;<a name="line.673"></a>
+<span class="sourceLineNo">674</span>     *  &lt;code&gt;stopAtNonOption&lt;/code&gt; &lt;b&gt;IS NOT&lt;/b&gt; set then add that<a name="line.674"></a>
+<span class="sourceLineNo">675</span>     *  character prepended with "&lt;b&gt;-&lt;/b&gt;".&lt;/li&gt;<a name="line.675"></a>
+<span class="sourceLineNo">676</span>     * &lt;/ul&gt;<a name="line.676"></a>
+<span class="sourceLineNo">677</span>     *<a name="line.677"></a>
+<span class="sourceLineNo">678</span>     * @param token The current token to be &lt;b&gt;burst&lt;/b&gt;<a name="line.678"></a>
+<span class="sourceLineNo">679</span>     * at the first non-Option encountered.<a name="line.679"></a>
+<span class="sourceLineNo">680</span>     * @throws ParseException if there are any problems encountered<a name="line.680"></a>
+<span class="sourceLineNo">681</span>     *                        while parsing the command line token.<a name="line.681"></a>
+<span class="sourceLineNo">682</span>     */<a name="line.682"></a>
+<span class="sourceLineNo">683</span>    protected void handleConcatenatedOptions(String token) throws ParseException<a name="line.683"></a>
+<span class="sourceLineNo">684</span>    {<a name="line.684"></a>
+<span class="sourceLineNo">685</span>        for (int i = 1; i &lt; token.length(); i++)<a name="line.685"></a>
+<span class="sourceLineNo">686</span>        {<a name="line.686"></a>
+<span class="sourceLineNo">687</span>            String ch = String.valueOf(token.charAt(i));<a name="line.687"></a>
+<span class="sourceLineNo">688</span><a name="line.688"></a>
+<span class="sourceLineNo">689</span>            if (options.hasOption(ch))<a name="line.689"></a>
+<span class="sourceLineNo">690</span>            {<a name="line.690"></a>
+<span class="sourceLineNo">691</span>                handleOption(options.getOption(ch));<a name="line.691"></a>
+<span class="sourceLineNo">692</span><a name="line.692"></a>
+<span class="sourceLineNo">693</span>                if (currentOption != null &amp;&amp; token.length() != i + 1)<a name="line.693"></a>
+<span class="sourceLineNo">694</span>                {<a name="line.694"></a>
+<span class="sourceLineNo">695</span>                    // add the trail as an argument of the option<a name="line.695"></a>
+<span class="sourceLineNo">696</span>                    currentOption.addValueForProcessing(token.substring(i + 1));<a name="line.696"></a>
+<span class="sourceLineNo">697</span>                    break;<a name="line.697"></a>
+<span class="sourceLineNo">698</span>                }<a name="line.698"></a>
+<span class="sourceLineNo">699</span>            }<a name="line.699"></a>
+<span class="sourceLineNo">700</span>            else<a name="line.700"></a>
+<span class="sourceLineNo">701</span>            {<a name="line.701"></a>
+<span class="sourceLineNo">702</span>                handleUnknownToken(stopAtNonOption &amp;&amp; i &gt; 1 ? token.substring(i) : token);<a name="line.702"></a>
+<span class="sourceLineNo">703</span>                break;<a name="line.703"></a>
+<span class="sourceLineNo">704</span>            }<a name="line.704"></a>
+<span class="sourceLineNo">705</span>        }<a name="line.705"></a>
+<span class="sourceLineNo">706</span>    }<a name="line.706"></a>
+<span class="sourceLineNo">707</span>}<a name="line.707"></a>
 
 
 
@@ -763,4 +776,4 @@
 </pre>
 </div>
 </body>
-</html>
+</html>
\ No newline at end of file

Modified: websites/production/commons/content/proper/commons-cli/apidocs/src-html/org/apache/commons/cli/GnuParser.html
==============================================================================
--- websites/production/commons/content/proper/commons-cli/apidocs/src-html/org/apache/commons/cli/GnuParser.html (original)
+++ websites/production/commons/content/proper/commons-cli/apidocs/src-html/org/apache/commons/cli/GnuParser.html Mon Mar 13 09:49:52 2017
@@ -184,4 +184,4 @@
 </pre>
 </div>
 </body>
-</html>
+</html>
\ No newline at end of file

Modified: websites/production/commons/content/proper/commons-cli/apidocs/src-html/org/apache/commons/cli/HelpFormatter.html
==============================================================================
--- websites/production/commons/content/proper/commons-cli/apidocs/src-html/org/apache/commons/cli/HelpFormatter.html (original)
+++ websites/production/commons/content/proper/commons-cli/apidocs/src-html/org/apache/commons/cli/HelpFormatter.html Mon Mar 13 09:49:52 2017
@@ -1163,4 +1163,4 @@
 </pre>
 </div>
 </body>
-</html>
+</html>
\ No newline at end of file

Modified: websites/production/commons/content/proper/commons-cli/apidocs/src-html/org/apache/commons/cli/MissingArgumentException.html
==============================================================================
--- websites/production/commons/content/proper/commons-cli/apidocs/src-html/org/apache/commons/cli/MissingArgumentException.html (original)
+++ websites/production/commons/content/proper/commons-cli/apidocs/src-html/org/apache/commons/cli/MissingArgumentException.html Mon Mar 13 09:49:52 2017
@@ -140,4 +140,4 @@
 </pre>
 </div>
 </body>
-</html>
+</html>
\ No newline at end of file

Modified: websites/production/commons/content/proper/commons-cli/apidocs/src-html/org/apache/commons/cli/MissingOptionException.html
==============================================================================
--- websites/production/commons/content/proper/commons-cli/apidocs/src-html/org/apache/commons/cli/MissingOptionException.html (original)
+++ websites/production/commons/content/proper/commons-cli/apidocs/src-html/org/apache/commons/cli/MissingOptionException.html Mon Mar 13 09:49:52 2017
@@ -165,4 +165,4 @@
 </pre>
 </div>
 </body>
-</html>
+</html>
\ No newline at end of file



Mime
View raw message