diff options
Diffstat (limited to 'test/pretty/resource')
-rw-r--r-- | test/pretty/resource/after/tryWithResourcesVarRef.java | 9 | ||||
-rw-r--r-- | test/pretty/resource/before/TryWithResourcesVarRef.java | 10 |
2 files changed, 19 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(); + } + } +} diff --git a/test/pretty/resource/before/TryWithResourcesVarRef.java b/test/pretty/resource/before/TryWithResourcesVarRef.java new file mode 100644 index 00000000..6c039eb7 --- /dev/null +++ b/test/pretty/resource/before/TryWithResourcesVarRef.java @@ -0,0 +1,10 @@ +//version 9: +import java.io.PrintWriter; +public class TryWithResourcesVarRef { + { + PrintWriter pw = new PrintWriter(System.out); + try (pw) { + pw.println(); + } + } +} |