* xor <x...@gmx.li> [2009-05-05 12:35:21]: > On Tuesday 05 May 2009 02:06:10 you wrote: > > Please don't do this. > > Closer is for closing the streams _silently_. > > (most often in the finally{} block when error have occurred > > already/expected) If you want logging, you should call .close() directly. > > Errors should never occur during close so we should log them, shouldn't we? > I added the logging because nextgens complained that there was no proper > logging - nextgens can you explain why we need it from your point of view? >
That's not what I said/wrote. We do need logging when we free() and that's what I complained about; not when we close(). By the way, I also wrote that all that free() stuff shouldn't be in Closer: it doesn't belong here. > > commit 9645c379de05e4f884ac3c1e2ef616884232963c > > Author: xor <x...@freenetproject.org> > > Date: Mon May 4 20:13:04 2009 +0200 > > > > Fix logging. > > > > diff --git a/src/freenet/support/io/Closer.java > > b/src/freenet/support/io/Closer.java > > index 1e7a532..6899e63 100644 > > --- a/src/freenet/support/io/Closer.java > > +++ b/src/freenet/support/io/Closer.java > > @@ -46,6 +46,7 @@ public class Closer { > > try { > > closable.close(); > > } catch (IOException e) { > > + Logger.error(Closer.class, "Error > > during close().", e); > > } > > } > > } > > @@ -59,7 +60,7 @@ public class Closer { > > try { > > bucket.free(); > > } catch(RuntimeException e) { > > - Logger.error(bucket, "Error during > > free()."); + Logger.error(Closer.class, > > "Error > > during free().", e); > > } > > } > > } > > @@ -75,6 +76,7 @@ public class Closer { > > try { > > zipFile.close(); > > } catch (IOException e) { > > + Logger.error(Closer.class, "Error > > during close().", e); > > } > > } > > } > > > _______________________________________________ > Devl mailing list > Devl@freenetproject.org > http://emu.freenetproject.org/cgi-bin/mailman/listinfo/devl
signature.asc
Description: Digital signature
_______________________________________________ Devl mailing list Devl@freenetproject.org http://emu.freenetproject.org/cgi-bin/mailman/listinfo/devl