Since Java 9, what is valid inside the try-with-resources header that was not allowed in Java 7/8?final MyResource r = openResource(); try (r) { use(r); }