ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Matt Benson <gudnabr...@yahoo.com>
Subject Re: Purpose of FileUtils.close(...)
Date Fri, 28 Jan 2005 16:31:07 GMT
--- Jesse Glick <jesse.glick@sun.com> wrote:

> Matt Benson wrote:
> > [...] the Exception won't be thrown unless you
> explicitly sync() the 
> > FileDescriptor; otherwise the write will take
> place in cache and the
> > result on disk later will be a zero-byte file.
> [...]
> 
> So close() is not enough, you have to sync()? If
> true this sounds like a 
> bug in the JRE that should be filed as such.

http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=4338871

> Normal
> application code 
> should not have to go around making special
> low-level calls like this. 

Now, Jesse, that's all well and good to say, but I
find it hard to believe you have spent several years
working on NetBeans without having had to use
workarounds to accommodate JRE limitations for the
good of your product.

> Anyway excessive calls to sync() are likely to be
> bad for typical 
> performance.
> 
That's possible, dunno.  :) But only at close()?

-Matt

> -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
> 
> 


__________________________________________________
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