Files
lombok/test/transform/resource/after-delombok/ValInTryWithResources.java
T
Reinier Zwitserloot 844995fc60 All tests now succeed on all platforms again;
'optional' expected messages added.
expanded some tests.
Added a check if the bootclasspath supports a certain version, i.e. don't try to run a JDK7-only test if AutoClosable isn't available.
2014-05-08 00:39:59 +02:00

11 lines
308 B
Java

//version 7:
import java.io.IOException;
public class ValInTryWithResources {
public void whyTryInsteadOfCleanup() throws IOException {
try (java.io.InputStream in = getClass().getResourceAsStream("ValInTryWithResources.class")) {
final java.io.InputStream i = in;
final int j = in.read();
}
}
}