Project: Adobe Flex SDK

Revision: 3105

Author: jspiro@adobe.com

Date: 04 Sep 2008 18:05:39

Changes:

SDK-15764, SDK-15765 -- Two long standing Ant task bugs.
- Ant Tasks fail when setting fork="true" and there are spaces in the path name
- Setting fork="true" in Ant Tasks leads to warning

The issue with spaces is that forked tasks construct a stringified commandline, since Java doesn't allow you to pass real String[] to a new process. When not forking, we can pass the original String[], which makes spaces irrelevent. So the fix uses a Commandline.toString(String[]) which is designed to wrap arguments with spaces correctly with quotes, so the commandline tokenizes correctly.

Bugs: SDK-15764 SDK-15765
QA: This affects ant calls for _all_ FlexTasks where fork=true. It would be great if we have tests for both fork="true" and "false" where we tested paths and arguments with and without spaces -- off the top of my head, good ones to try: +flexlib=/path/with spaces/, -define=CONFIG::foo,"bar with spaces", and any other arguments you can think of. Also very important: Test passing space arguments without quotes, with single quotes, with double quotes, with a mixture (illegal), and with a mixture escaping the inner set of quotes (not sure if this should work or not, probably a stupid case to test unless quotes are allowed in paths).
Doc: No
Reviewer: Pete

Files:
modified: /flex/sdk/branches/3.0.x/modules/antTasks/src/flex/ant/FlexTask.java (try)
[?]
To list