aboutsummaryrefslogtreecommitdiff
path: root/test/pretty/resource/after
diff options
context:
space:
mode:
authorReinier Zwitserloot <r.zwitserloot@projectlombok.org>2019-02-19 02:08:08 +0100
committerReinier Zwitserloot <r.zwitserloot@projectlombok.org>2019-02-19 02:08:14 +0100
commit3ac415254f64d27003a3c5b7a232a33fd785b1f9 (patch)
treecb6c6be91972b5d6d30e0454eedacd66420284d9 /test/pretty/resource/after
parent8479edb4262a7eb8cb76baba138f0ea5aae841c5 (diff)
downloadlombok-3ac415254f64d27003a3c5b7a232a33fd785b1f9.tar.gz
lombok-3ac415254f64d27003a3c5b7a232a33fd785b1f9.tar.bz2
lombok-3ac415254f64d27003a3c5b7a232a33fd785b1f9.zip
[fixes #1997] try-with-resources where the thing you’re guarding is just a variable ref instead of a full decl (legal since JDK9) would break delombok
Diffstat (limited to 'test/pretty/resource/after')
-rw-r--r--test/pretty/resource/after/tryWithResourcesVarRef.java9
1 files changed, 9 insertions, 0 deletions
diff --git a/test/pretty/resource/after/tryWithResourcesVarRef.java b/test/pretty/resource/after/tryWithResourcesVarRef.java
new file mode 100644
index 00000000..5117f706
--- /dev/null
+++ b/test/pretty/resource/after/tryWithResourcesVarRef.java
@@ -0,0 +1,9 @@
+import java.io.PrintWriter;
+public class TryWithResourcesVarRef {
+ {
+ PrintWriter pw = new PrintWriter(System.out);
+ try (pw) {
+ pw.println();
+ }
+ }
+}