JDK-8276839 : Non-void AutoCloseable variant
  • Type: Enhancement
  • Component: core-libs
  • Sub-Component: java.lang
  • Affected Version: 11
  • Priority: P4
  • Status: New
  • Resolution: Unresolved
  • OS: generic
  • CPU: generic
  • Submitted: 2021-11-08
  • Updated: 2021-11-09
Description
A DESCRIPTION OF THE PROBLEM :
Could there be possibility of a generic value-returning AutoCloseable variant added to the JDK?
I'm not aware of backwards compatibility issues or incompatibilities with design philosophies so I'd be happy to be informed on feasibility.

This report does not target an actual release.



Comments
Moved to JDK for further investigations of the feasibility.
09-11-2021