Return-Path: Delivered-To: apmail-commons-issues-archive@minotaur.apache.org Received: (qmail 41493 invoked from network); 7 Apr 2009 10:43:36 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 7 Apr 2009 10:43:36 -0000 Received: (qmail 21865 invoked by uid 500); 7 Apr 2009 10:43:34 -0000 Delivered-To: apmail-commons-issues-archive@commons.apache.org Received: (qmail 21693 invoked by uid 500); 7 Apr 2009 10:43:34 -0000 Mailing-List: contact issues-help@commons.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: issues@commons.apache.org Delivered-To: mailing list issues@commons.apache.org Received: (qmail 21683 invoked by uid 99); 7 Apr 2009 10:43:34 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 07 Apr 2009 10:43:34 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.140] (HELO brutus.apache.org) (140.211.11.140) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 07 Apr 2009 10:43:33 +0000 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 4CEC0234C052 for ; Tue, 7 Apr 2009 03:43:13 -0700 (PDT) Message-ID: <358587866.1239100993313.JavaMail.jira@brutus> Date: Tue, 7 Apr 2009 03:43:13 -0700 (PDT) From: "Peter Henderson (JIRA)" To: issues@commons.apache.org Subject: [jira] Created: (EXEC-38) Tutorial example uses incorrect API call. MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 X-Virus-Checked: Checked by ClamAV on apache.org 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.