ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Matt Benson <>
Subject Re: [patch] NioFileUtils, FileUtilsAdapter + factory (was Re: AW: Adding a methof to StringUtils)
Date Thu, 20 Apr 2006 19:31:06 GMT
--- Martijn Kruithof <> wrote:

> Matt Benson schreef:
> >Another thought about the factory--it should cache
> an
> >instance of each FileUtils type to minimize object
> >creation.  We can either just have it be known that
> >FileUtilsAdapter impls should be stateless or have
> a
> >StatelessFileUtilsAdapter interface--if
> implemented,
> >cache, else don't.
> >
> >thoughts?
> >
> >-Matt
> >
> Well I am certainly in favour of keeping FileUtils
> stateless, by the 

My point was only that we can't really enforce that
FileUtilsAdapter (or whatever) impls are stateless. 
If we are making this factory-based we could allow
users to (theoretically) provide their own
implementation.  If such an impl was
stateful/non-threadsafe, singletons would misbehave. 
That's where my idea of a subinterface was coming
from.  Anyway...

> way, didn't you move copying of files to
> ResourceUtils some time ago?

viewcvs(svn) shows I did it 6.5 months ago...
apparently so.  Speaking of which, Kev (I think)
mentioned these are static in ResourceUtils, but as
they are unreleased we could change them to instance
methods.  The behavior there is fairly
straightforward, though, so I'm not sure if anything
would be gained by this...


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

Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 

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

View raw message