mirror of
https://github.com/tiennm99/lombok.git
synced 2026-10-03 11:12:33 +00:00
'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.
11 lines
308 B
Java
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();
|
|
}
|
|
}
|
|
}
|