ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Magesh Umasankar" <umag...@apache.org>
Subject Re: [SUBMIT] Selector API Implementation
Date Sun, 13 Jan 2002 20:52:35 GMT
From: "Peter Donald" <peter@apache.org>

> I noticed you added 2 methods to the
> FileScanner interface - but I guess that is highly unlikely to cause
issues
> outside of the main ant-dev tree - so I guess thats ok.

Well, I should have said this earlier, but here are 2 things where this
patch
may break backwards compatibility:
1.  Data type of protected members 'includes' and 'excludes' changed
from String to Pattern in DirectoryScanner
2.  Two new methods added to interface FileScanner.

I believe the feature that this patch provides outweighs both
these issues.  I will touch up ZipScanner also to work with the
new datatype of its superclass's include & exclude variables.
Meanwhile, I will also spend some time to see if I can work
around without having to change the datatype.

> About the only modification I would make is to add an initialize or
prepare
> method to the FileSelector.

Do we need an explicit method?  Can't the no-arg constructor be used
for such things?

> That way in the selector you wouldn't keep having
> to do expensive string compares. You could instead do the compare once and
> cache it in a boolean variable. That should be much faster.

I don't understand how we can cache these comparisons...
Any code to illsutrate?

> Another thing I just thought of is that passing in a File object is going
to
> make it difficult (impossible?) to work with ZipFileScanner and friends?
So
> it may be an idea to pass in a string or maybe we could just ignore the
fact
> that it doesn't work for the time being ... not sure. What do you think?

I am not familiar with ZipScanner, but I am open to changing it to String
if that will get around the problem.

>
> Pete
>

Cheers,
Magesh



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


Mime
View raw message