commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Carlos Aya" <>
Subject CLI PosixParser, bug?
Date Mon, 07 Mar 2005 02:03:01 GMT
Hi All

I think there is a bug in CLI PosixParser.parse (unexpected default behaviour ;-)

When using parse with stopAtNotOption = true if one has Options defined for 'x' and 'y', not
option for 'n', in the following scenarios... one gets... (say command is my command which
uses CLI)

command -x XXX -y YYY -n NNN --> getArgList is "NNN" (-n is not there, but one knows something
was wrong because of "NNN")

command -x XXX -y YYY -n     --> getArgList is empty (-n passes unnoticed) A bug!?

This is: there is no way to see a non-defined option when it's last and it has no args.

The problem seems to be in Posix.flatten, it doesn't eat the current unrecognized token.


View raw message