aboutsummaryrefslogtreecommitdiff
path: root/test/transform/resource/after-ecj/ValInTryWithResources.java
diff options
context:
space:
mode:
Diffstat (limited to 'test/transform/resource/after-ecj/ValInTryWithResources.java')
-rw-r--r--test/transform/resource/after-ecj/ValInTryWithResources.java14
1 files changed, 14 insertions, 0 deletions
diff --git a/test/transform/resource/after-ecj/ValInTryWithResources.java b/test/transform/resource/after-ecj/ValInTryWithResources.java
new file mode 100644
index 00000000..a532d48c
--- /dev/null
+++ b/test/transform/resource/after-ecj/ValInTryWithResources.java
@@ -0,0 +1,14 @@
+import lombok.val;
+import java.io.IOException;
+public class ValInTryWithResources {
+ public ValInTryWithResources() {
+ super();
+ }
+ public void whyTryInsteadOfCleanup() throws IOException {
+ try (final @val java.io.InputStream in = getClass().getResourceAsStream("ValInTryWithResources.class"))
+ {
+ final @val java.io.InputStream i = in;
+ final @val int j = in.read();
+ }
+ }
+}