File tree Expand file tree Collapse file tree
src/java/org/apache/commons/cli Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11/*
2- * $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//cli/src/java/org/apache/commons/cli/PosixParser.java,v 1.9 2002/08/26 20:15:02 jkeyes Exp $
3- * $Revision: 1.9 $
4- * $Date: 2002/08/26 20:15:02 $
2+ * $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//cli/src/java/org/apache/commons/cli/PosixParser.java,v 1.10 2002/09/09 19:35:24 jkeyes Exp $
3+ * $Revision: 1.10 $
4+ * $Date: 2002/09/09 19:35:24 $
55 *
66 * ====================================================================
77 *
7272 *
7373 * @author John Keyes (jbjk at mac.com)
7474 * @see Parser
75- * @version $Revision: 1.9 $
75+ * @version $Revision: 1.10 $
7676 */
7777public class PosixParser extends Parser {
7878
@@ -153,7 +153,14 @@ protected String[] flatten( Options options,
153153
154154 // handle SPECIAL TOKEN
155155 if ( token .startsWith ( "--" ) ) {
156- tokens .add ( token );
156+ if ( token .indexOf ( '=' ) != -1 ) {
157+ tokens .add ( token .substring ( 0 , token .indexOf ( '=' ) ) );
158+ tokens .add ( token .substring ( token .indexOf ( '=' ) + 1 ,
159+ token .length () ) );
160+ }
161+ else {
162+ tokens .add ( token );
163+ }
157164 }
158165 // single hyphen
159166 else if ( "-" .equals ( token ) ) {
You can’t perform that action at this time.
0 commit comments