ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 30921] - Quotes in CLASSPATH can screw up ant.bat
Date Fri, 07 Jan 2005 13:18:52 GMT
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=30921>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND·
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=30921





------- Additional Comments From shalmaneser@ePost.de  2005-01-07 14:18 -------
Depends on the objectives. Despite the lore Matt mentioned,
there are people relying on setting the classpath, so the
committers might want to keep this just for the sake of
backward compatibility.

btw.: didn't you mean to say 'true'?

Extending your table:
    BLAH set to: | some text | "some text" |  ""   | not set | text  | _ text |
test performed   |           |             |       |         |       |        |
-----------------+-----------+-------------+-------+---------+-------+--------+
%BLAH%_==_       |   error   |    false    | false |  true   | false | error  |
-----------------+-----------+-------------+-------+---------+-------+--------+
_==%BLAH%_       | false(*)  |    false    | false |  true   | false | error  |
-----------------+-----------+-------------+-------+---------+-------+--------+

(*) in
     IF _==%BLAH%_ ECHO Hi There

This would be ok, since the interpreter sees:

     IF _==some text_ ECHO Hi There

and stops interpretation after evaluating _==some to false

but in 
     IF NOT _==%BLAH%_ ECHO Hi There

this breaks, because the interpreter now tries to execute

     text_

as a command.
Only problem here is the special role of the _ here, but I trust
that pathes are rarely starting with underscore + blank.


Anyway, this would work the same way regardless, wether there are 
quotes in the content of BLAH or not.

As for the classpath argument in the java commandline:
There shouldn't be any problems with quotes in it,
as long as there's an even count, and you don't expect
the 'missquoted' entries to be found by the JVM.
Brents example confirms, that there are no problems
with spaces in a file name on the classpath, if properly quoted.

Remember, that there might be quotes, regardless wether
there are spaces to protect or not.

So I would recommend: 
- either let it the way it is,
- or fix the if the way described above.

Thomas

P.S.: I volonteer to do the patch, if somebody else
commits.

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
For additional commands, e-mail: dev-help@ant.apache.org


Mime
View raw message