[PATCH] JDK-8054565: FilterOutputStream.close may throw IOException if called twice and underlying flush or close fails

Bernd Eckenfels ecki at zusammenkunft.net
Fri Dec 5 01:02:45 UTC 2014


Am Fri, 5 Dec 2014 11:49:26 +1100
schrieb Nathan Clement <nathan.a.clement at hotmail.com>:

> Hi,
> 
> My problem is definitely not related to multi-threaded use.  The test
> shows basically the same code that we have in production that
> experienced the problem.

Of course it can be triggered single threaded. But this does not mean
you should not fix it for concurrent use as well (for the reasons
mentioned).

> I don't see that this change is any more risky than the change that
> introduced this bug.  I'm more than happy to have the bug fixed in a
> different way - this is just the first solution that occurred to me.

Well, the change which introduced the bug (and others in this area) are
risky and did break things. I just want to make sure you are aware of
it. I feel that its not worth fixing, but its not my call.

However your problem is easily solved in an overwritten close() method.
I bet you will not wait for this to hit a production ready Java, anyway.

Gruss
Bernd



More information about the core-libs-dev mailing list