Uploaded image for project: 'Commons CLI'
  1. Commons CLI
  2. CLI-213

Quoted string parsing

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Duplicate
    • Affects Version/s: 1.2
    • Fix Version/s: 1.3
    • Component/s: Parser
    • Labels:
      None
    • Environment:

      Kubuntu, JRE 1.6

      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

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                vishal.dhawani Vishal Dhawani
              • Votes:
                0 Vote for this issue
                Watchers:
                0 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: