ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stefan Bodewig <>
Subject Re: cvs commit: jakarta-ant/src/testcases/org/apache/tools/ant/taskdefs
Date Mon, 27 Jan 2003 14:09:56 GMT
On 27 Jan 2003, <> wrote:

>   ZIP-Entries always use forward slashes

I'm not sure that this is the best solution to the problem.

The context is:

SourceSelector calls getResource on ResourceFactory with a name
argument that comes from a Resource#getName.  As it stands we have two
different Resource types, but there may be more in the future.

File base Resources will hand out Resources with names that will have
platform specific file separators.  They probably expect names in
getResource calls to use the platform's separator, but may be able to
deal with forward slashes even on Windows.

ZipEntry based Resources will hand out Resources with names that
always use / as separator, they can now deal with both types of input.

Maybe it would be better to tighten up the contract, both for
Resource#getName as well as ResourceFactory#getResource?

What would be the best policy?  Use the platform's separator
everywhere?  Use slashes everywhere?  Accept everything but always
return the platform dependent names?  I'm not sure, but the current
solution smells a bit.


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

View raw message