title: Is it possible for try-with-resource to fail to close resources?
body: <p>As per Oracle documentation</p>
  
  <blockquote>
    <p>The try-with-resources statement is a try statement that declares one or more resources. A resource is as an object that must be closed after the program is finished with it. The try-with-resources statement ensures that each resource is closed at the end of the statement. Any object that implements java.lang.AutoCloseable, which includes all objects which implement java.io.Closeable, can be used as a resource</p>
  </blockquote>
  
  <p>If a resource does not implement AutoCloseable it cannot be declared within try block, it has to be declared in the body part &amp; has to be explicitly closed in finally block.
  Is it possible for try-with-resource to fail to clean up resources unless you use the idiom incorrectly like if there are nested resources &amp; close() call is not idempotent for the underlying resource?
  What I understand is try-with-resource only ensures close() getting called behind the scene, but if close itself does not close underlying resources try-with-resource will remain ineffective to clean-up resources.
  Does anyone have a contrary view or more clarification?</p>