ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jesse Glick <jesse.gl...@sun.com>
Subject Re: [Patch] change org.apache.tools.ant.taskdefs.Concat to use static method FileUtils.readFully
Date Wed, 01 Dec 2004 05:17:22 GMT
Stefan Bodewig wrote:
> Initially we thought we'd provide subclasses for different OSes like 
> OpenVMSFileUtils or NetwareFileUtils and would use newFileUtils as a 
> factory method.  We never did so, though.
> 
> Some of the functionality would be the same among all OSes (like 
> closing streams or reading files completely) and could be static, 
> others like normalizing file names would be OS dependent and had to
> be non-static.

But it seems that various methods already do OS-dependent checks; this 
should work equally well with static methods, right? Since the OS does 
not change during the VM lifetime (I would hope!) there is no reason to 
keep any state in a FileUtils instance (you could use static variables 
if you needed to cache something), so there is no reason to have an 
instance at all.

-J.

-- 
Jesse Glick <mailto:jesse.glick@sun.com> x22801
NetBeans, Open APIs  <http://www.netbeans.org/>


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


Mime
View raw message