Description
When you pass a quoted string as argument in command line (eg. java Hello -e "fname=\"vishal\" and lname=\"dhawani\""), it gives you one character less in result (eg. cmdLine.getOptionValue("e") will return you fname="vishal" and lname="dhawani).
Actually when you see the args[] passed to java, args[1] is fname="vishal" and lname="dhawani" .
The above thing works when we give extra space, ie. java Hello -e "fname=\"vishal\" and lname=\"dhawani\" ".
Please check.
Attachments
Issue Links
- duplicates
-
CLI-185 Commons CLI incorrectly stripping leading and trailing quotes
- Closed