--- Begin Message ---
Subject: |
Re: [cp-patches] Re: FYI: java/io/FileInputStream.java& java/io/FileOutputStream.java |
Date: |
Thu, 10 Mar 2005 15:24:01 +0100 |
User-agent: |
Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.5) Gecko/20050105 Debian/1.7.5-1 |
Jeroen Frijters wrote:
Dalibor Topic wrote:
OK, I'll post a patch that does that, without the close() part, after
some more testing and writing a muave test case. Thanks for your help!
What exactly do you mean by "the close() part"? The fact that the fd
should be closed in the constructor when the exception is thrown?
Yeah. as you can see in my patch, i don't do that atm, because close()
can throw a general IOException, which I'd then have to wrap into the
FileNotFoundException, too, or ignore. I wasn't sure about either
approach, so I let the close() out and left closing the channel to the
finalizer.
What's your opinion on that? Should I close() & ignore potential
exception thrown by close(), or wrap it within FileNotFoundException, or
leave closing to gc as I do now?
cheers,
dalibor topic
--- End Message ---