ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Matt Benson <gudnabr...@yahoo.com>
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 <jkf@apache.org> 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...

-Matt

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


__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

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


Mime
View raw message