View Javadoc
1   package com.puppycrawl.tools.checkstyle.checks.indentation.indentation; //indent:0 exp:0
2   
3   /**                                                                            //indent:0 exp:0
4    * This test-input is intended to be checked using following configuration:    //indent:1 exp:1
5    *                                                                             //indent:1 exp:1
6    * arrayInitIndent = 4                                                         //indent:1 exp:1
7    * basicOffset = 4                                                             //indent:1 exp:1
8    * braceAdjustment = 0                                                         //indent:1 exp:1
9    * caseIndent = 4                                                              //indent:1 exp:1
10   * forceStrictCondition = false                                                //indent:1 exp:1
11   * lineWrappingIndentation = 4                                                 //indent:1 exp:1
12   * tabWidth = 4                                                                //indent:1 exp:1
13   * throwsIndent = 4                                                            //indent:1 exp:1
14   *                                                                             //indent:1 exp:1
15   *  @author  jrichard                                                         //indent:1 exp:1
16   */                                                                            //indent:1 exp:1
17  public class InputIndentationValidTryIndent { //indent:0 exp:0
18  
19      /** Creates a new instance of InputIndentationValidTryIndent */ //indent:4 exp:4
20      public InputIndentationValidTryIndent() { //indent:4 exp:4
21      } //indent:4 exp:4
22  
23      public void method() { //indent:4 exp:4
24  
25          try { //indent:8 exp:8
26          } catch (Throwable t) { //indent:8 exp:8
27              System.identityHashCode("err"); //indent:12 exp:12
28          } //indent:8 exp:8
29  
30          try { //indent:8 exp:8
31              System.identityHashCode("test"); //indent:12 exp:12
32          } finally { //indent:8 exp:8
33              System.identityHashCode("finally"); //indent:12 exp:12
34          } //indent:8 exp:8
35  
36          try { //indent:8 exp:8
37          } catch (Throwable t) { //indent:8 exp:8
38              System.identityHashCode("err"); //indent:12 exp:12
39          } finally { //indent:8 exp:8
40          } //indent:8 exp:8
41  
42          try { //indent:8 exp:8
43          } catch (Exception t) { //indent:8 exp:8
44              System.identityHashCode("err"); //indent:12 exp:12
45          } catch (Throwable t) { //indent:8 exp:8
46              System.identityHashCode("err"); //indent:12 exp:12
47          } //indent:8 exp:8
48  
49          try { //indent:8 exp:8
50          } catch (Exception t) { //indent:8 exp:8
51          } catch (Throwable t) { //indent:8 exp:8
52          } //indent:8 exp:8
53  
54  
55          try { //indent:8 exp:8
56              System.identityHashCode("try"); //indent:12 exp:12
57          }  //indent:8 exp:8
58          catch (Exception t) { //indent:8 exp:8
59              System.identityHashCode("err"); //indent:12 exp:12
60              System.identityHashCode("err"); //indent:12 exp:12
61          }  //indent:8 exp:8
62          catch (Throwable t) { //indent:8 exp:8
63              System.identityHashCode("err"); //indent:12 exp:12
64          }  //indent:8 exp:8
65          finally { //indent:8 exp:8
66          } //indent:8 exp:8
67  
68          try  //indent:8 exp:8
69          { //indent:8 exp:8
70              System.identityHashCode("try"); //indent:12 exp:12
71          }  //indent:8 exp:8
72          catch (Exception t)  //indent:8 exp:8
73          { //indent:8 exp:8
74              System.identityHashCode("err"); //indent:12 exp:12
75              System.identityHashCode("err"); //indent:12 exp:12
76          }  //indent:8 exp:8
77          catch (Throwable t)  //indent:8 exp:8
78          { //indent:8 exp:8
79              System.identityHashCode("err"); //indent:12 exp:12
80          } //indent:8 exp:8
81          finally  //indent:8 exp:8
82          { //indent:8 exp:8
83          } //indent:8 exp:8
84  
85          try  //indent:8 exp:8
86          { //indent:8 exp:8
87          }  //indent:8 exp:8
88          catch (NullPointerException | IllegalArgumentException t)  //indent:8 exp:8
89          { //indent:8 exp:8
90              System.identityHashCode("err"); //indent:12 exp:12
91          } //indent:8 exp:8
92  
93          try  //indent:8 exp:8
94          { //indent:8 exp:8
95          }  //indent:8 exp:8
96          catch (NullPointerException //indent:8 exp:8
97              | IllegalArgumentException t)  //indent:12 exp:12
98          { //indent:8 exp:8
99              System.identityHashCode("err"); //indent:12 exp:12
100         } //indent:8 exp:8
101 
102         try  //indent:8 exp:8
103         { //indent:8 exp:8
104         }  //indent:8 exp:8
105         catch (NullPointerException | //indent:8 exp:8
106             IllegalArgumentException t)  //indent:12 exp:12
107         { //indent:8 exp:8
108             System.identityHashCode("err"); //indent:12 exp:12
109         } //indent:8 exp:8
110     } //indent:4 exp:4
111 
112 } //indent:0 exp:0