Re: Purpose of FileUtils.close(...)

2005-03-04 Thread Peter Reilly
Matt Benson wrote: PING... --- Matt Benson <[EMAIL PROTECTED]> wrote: [SNIP] In talking about whether caught Exceptions should at least be logged, Jesse mentioned "disk full" as an example. We actually have a bugrep (32676) about full directories, and I found a blog today on which a German fell

Re: Purpose of FileUtils.close(...)

2005-03-03 Thread Matt Benson
PING... --- Matt Benson <[EMAIL PROTECTED]> wrote: [SNIP] > In > talking about whether caught Exceptions should at > least be logged, Jesse mentioned "disk full" as an > example. We actually have a bugrep (32676) about > full > directories, and I found a blog today on which a > German fellow has p

Re: Purpose of FileUtils.close(...)

2005-01-29 Thread Jesse Glick
Matt Benson wrote: 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 wi

Re: Purpose of FileUtils.close(...)

2005-01-28 Thread Matt Benson
--- Jesse Glick <[EMAIL PROTECTED]> 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 e

Re: Purpose of FileUtils.close(...)

2005-01-28 Thread Jesse Glick
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

Re: Purpose of FileUtils.close(...)

2005-01-25 Thread Matt Benson
--- Jesse Glick <[EMAIL PROTECTED]> wrote: > Matt Benson wrote: > > [...] In talking about whether caught Exceptions > should at least be > > logged, Jesse mentioned "disk full" as an example. > [...] I found a > > blog today [with] a workaround to detect this > condition when writing > > with a F

Re: Purpose of FileUtils.close(...)

2005-01-25 Thread Jesse Glick
Matt Benson wrote: [...] In talking about whether caught Exceptions should at least be logged, Jesse mentioned "disk full" as an example. [...] I found a blog today [with] a workaround to detect this condition when writing with a FOS, using the sync() method of the descriptor available from the str

Re: AspectJ logging was [Re: Purpose of FileUtils.close(...)]

2005-01-20 Thread Steve Loughran
Kev Jackson wrote: Another thought: We could create an AntThread class to tie a Thread to a Project. Most places that currently use Thread constructors would use the same AntThread constructor. The top-level AntThread could be constructed with an explicit Project; others could inherit the Proje

AspectJ logging was [Re: Purpose of FileUtils.close(...)]

2005-01-20 Thread Kev Jackson
Another thought: We could create an AntThread class to tie a Thread to a Project. Most places that currently use Thread constructors would use the same AntThread constructor. The top-level AntThread could be constructed with an explicit Project; others could inherit the Project from the AntThre

Re: Purpose of FileUtils.close(...)

2005-01-19 Thread Matt Benson
I have lost the original thread, but anyway, those who participated in the discussion should remember it. In talking about whether caught Exceptions should at least be logged, Jesse mentioned "disk full" as an example. We actually have a bugrep (32676) about full directories, and I found a blog t

Re: Purpose of FileUtils.close(...)

2005-01-04 Thread Steve Loughran
(I'm just catching up on 3 weeks worth of mail, sorry for joining in late) >> So what exactly *is* the intention of this method? [...] We wrote it because we were repeating the same code throughout exception handling logic: closing files and swallowing exceptions. try { file=myfile.open(); ...

Re: Purpose of FileUtils.close(...)

2004-12-18 Thread Jesse Glick
Kev Jackson wrote: So what exactly *is* the intention of this method? [...] 1. My intention was only to uniform the codebase around the helper methods that were presumably created for this sort of task. Yes, I was really addressing other committers generally, sorry for the confusion. I should ad

Re: Purpose of FileUtils.close(...)

2004-12-17 Thread Kev Jackson
So what exactly *is* the intention of this method? IMHO, if an IOException was thrown when some stream was closed, it was probably for a reason, and probably something is broken, and probably the user should find out about it - and fix it - rather than have the problem be permanently suppressed

Purpose of FileUtils.close(...) (was: Re: [Patch] FileUtils more minor changes)

2004-12-16 Thread Jesse Glick
Kev Jackson wrote: As an aside, I went through the entire codebase last night and replaced every try { somthing.close() } catch (IOException e) { //swallow exception } with FileUtils.close() So what exactly *is* the intention of this method? IMHO, if an IOException was thrown when some strea