commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Peter Henderson (JIRA)" <j...@apache.org>
Subject [jira] Created: (EXEC-38) Tutorial example uses incorrect API call.
Date Tue, 07 Apr 2009 10:43:13 GMT
Tutorial example uses incorrect API call.
-----------------------------------------

                 Key: EXEC-38
                 URL: https://issues.apache.org/jira/browse/EXEC-38
             Project: Commons Exec
          Issue Type: Bug
    Affects Versions: 1.0.0
            Reporter: Peter Henderson


http://commons.apache.org/exec/tutorial.html

The section "Build the Command Line Incrementally" uses 
commandLine.addArguments(file.getAbsolutePath());

which will go horribly wrong if the path has spaces in it.

It should be using
commandLine.addArgument(file.getAbsolutePath());

Note the singular addArgument

The two preceding calls to addArgument could also benefit from being changed.

Peter


-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message