aboutsummaryrefslogtreecommitdiff
path: root/test/transform/resource/before/ValInTryWithResources.java
diff options
context:
space:
mode:
Diffstat (limited to 'test/transform/resource/before/ValInTryWithResources.java')
-rw-r--r--test/transform/resource/before/ValInTryWithResources.java12
1 files changed, 12 insertions, 0 deletions
diff --git a/test/transform/resource/before/ValInTryWithResources.java b/test/transform/resource/before/ValInTryWithResources.java
new file mode 100644
index 00000000..780e1c71
--- /dev/null
+++ b/test/transform/resource/before/ValInTryWithResources.java
@@ -0,0 +1,12 @@
+//version 7
+import lombok.val;
+import java.io.IOException;
+
+public class ValInTryWithResources {
+ public void whyTryInsteadOfCleanup() throws IOException {
+ try (val in = getClass().getResourceAsStream("ValInTryWithResources.class")) {
+ val i = in;
+ val j = in.read();
+ }
+ }
+} \ No newline at end of file