commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Daniel F. Savarese" <>
Subject Re: [NET] Here's an Ant bug that we should look into fixing
Date Sun, 09 Mar 2003 22:53:14 GMT

>I had thought I might hear some replies to this.  The silence has been =

I haven't said anything because 1. no time and 2. it was a feature request
and not a bug :)  As you indicated, FTP listings can take on any arbitrary
format.  We can only hope to handle the most common cases and provide
enough hooks so that users can specialize the behavior to meet their
specific needs.  Locale-specific date parsing may be a common enough
need to take up, but this is the first time I've heard a request.  Still,
even if it didn't affect Ant users, it warrants attention.

I'd experiment a little with an entry parser that delegates the date parsing
to a user-provided class that conforms to some date parsing interface we cook
up (along with a default implementation that relies on a user-provided
DateFormat instance).  Then I'd ponder whether the date parsing hook should
be added into the entry parser interface or if it should remain in a
specialized implementation.  My initial bias is to leave it in a specialized
implementation or create a new interface that extends FTPFileEntryParser.  As
for automatically determining what parser and locale to use, I'd put that
in an interface (with a default implementation) that figures it out for
FTPClient at the programmer's discretion.  It's never going to work for
all cases.  I'd draw some diagrams or write some stub code to better
convey my meaning, but there's that time thing.

If you've got the itch to do this, by all means take a stab at it.  We
can iterate on what the interfaces and classes should ultimately look
like.  I can talk all I want, but without writing some initial code and
using the API additions, I can't tell what's going to work best.
Anyway, so long as the most common cases are covered and programmers
using the API always have the ability to specialize behavior to their
specific needs, we're doing pretty well.  Whatever the case, I sense more
of that rampant String creation that Java encourages :)


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

View raw message