RFR: jsr166 jdk9 integration wave 2

Martin Buchholz martinrb at google.com
Wed Dec 16 20:48:55 UTC 2015


One more point - In try-with-resources it's clear that the try body is
the "main event" while the auto-generated calls to close are intended
to be "cleanup", so it's natural that the try body exception wins.
With whenComplete:
- it's less obvious that the whenComplete action is unimportant
- both CompletionStages may remain accessible so the risk of losing
the source exception is lower, and preserving the integrity of the
source exception is more valuable.



More information about the core-libs-dev mailing list