View Javadoc
1   package com.puppycrawl.tools.checkstyle.grammar;
2   
3   public class InputAstRegressionTryWithResourcesOnAutoCloseable {
4       static class T implements AutoCloseable {
5           public void doIt() {
6               open();
7               try (this) {
8                   System.out.println("doIt");
9               }
10  
11              T t = new T();
12  
13              try (t) {
14                  System.out.println("doIt");
15              }
16          }
17  
18          public void open() {
19              System.out.println("open");
20          }
21  
22          @Override
23          public void close() {
24              System.out.println("close");
25          }
26      }
27  }