ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Charles McLouth <>
Subject Re: PathTokenizer
Date Mon, 16 Jul 2007 15:51:32 GMT
Hi Matt,

Thank you for the response.  Of course you are absolutely correct.  But that 
alone doesn't preclude allowing it.

In my case I have a "path" being provided that I must prepare for the shell (As 
you note, common practice is to escape parms with whitespace).  I figured I'd 
use the built-in object instead of rolling my own for parsing the user supplied 
data.  But the PathTokenizer's implementation will choke on a quoted path 
(something that I expect to be quite commonly done by a user, in my case.)

Thank you for the response.  Your answer is sufficient for me to determine that 
my case is far enough in the corner to relegate it to its own implementation.

Thanks again,


Matt Benson wrote:
> --- Charles McLouth <> wrote:
>> A newbie question:
>> Is there a particular reason why the PathTokenizer 
>> (src/main/org/apache/tools/ant/
>> isn't coded to handle quoted 
>> windows paths?
>> ex:
>> "C:\a whitespace path\a whitespace file"
> Can you give a better example of what you think should
> be happening that isn't?  In general, Java IO
> implementations are perfectly capable of understanding
> individual file paths with embedded whitespace, so
> AFAIK quoting paths is considered to be a convenience
> for working with shells (for example, in *nix shells
> one can simply escape ws chars rather than quoting
> them).  Quoting individual components of a larger path
> structure would be similarly irrelevant/redundant.
> -Matt
>> I have a fix, but wanted to know if there was a
>> valid reason that I did not see.
>> thanks,
>> charlie
> ---------------------------------------------------------------------
>> To unsubscribe, e-mail:
>> For additional commands, e-mail:
> ____________________________________________________________________________________
> Boardwalk for $500? In 2007? Ha! Play Monopoly Here and Now (it's updated for today's
economy) at Yahoo! Games.
> ---------------------------------------------------------------------
> To unsubscribe, e-mail:
> For additional commands, e-mail:

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message