On 26/06/2015 09:17, Peter Levart wrote:
:
Quite the contrary, previously, if flush() threw any unchecked
exception (ThreadDeath included), it was ignored if out.close() also
threw (IOException or any unchecked exception).
Yes, this is what I was trying to say.
+ // evaluate possible precedence of
flushException over closeException
+ if ((flushException instanceof ThreadDeath) &&
+ !(closeException instanceof ThreadDeath)) {
+ flushException.addSuppressed(closeException);
+ throw (ThreadDeath) flushException;
+ }
That would be better and would deal with the concern with webrev.02.
-Alan