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 InputIndentationValidWhileIndent { //indent:0 exp:0
18  
19      /** Creates a new instance of InputIndentationValidWhileIndent */ //indent:4 exp:4
20      public InputIndentationValidWhileIndent() { //indent:4 exp:4
21      } //indent:4 exp:4
22  
23      private void method1() //indent:4 exp:4
24      { //indent:4 exp:4
25          boolean test = true; //indent:8 exp:8
26  
27          while (test) System.getProperty("foo"); //indent:8 exp:8
28  
29          while (test) //indent:8 exp:8
30              System.getProperty("foo"); //indent:12 exp:12
31  
32          while (test) { //indent:8 exp:8
33          } //indent:8 exp:8
34  
35          while (test) //indent:8 exp:8
36          { //indent:8 exp:8
37          } //indent:8 exp:8
38  
39          while (test) //indent:8 exp:8
40          { //indent:8 exp:8
41              System.getProperty("foo"); //indent:12 exp:12
42          } //indent:8 exp:8
43  
44          while (test)  { //indent:8 exp:8
45              System.getProperty("foo"); //indent:12 exp:12
46          } //indent:8 exp:8
47  
48          while (test)  { //indent:8 exp:8
49              System.getProperty("foo"); //indent:12 exp:12
50              System.getProperty("foo"); //indent:12 exp:12
51          } //indent:8 exp:8
52  
53          while (test) //indent:8 exp:8
54          { //indent:8 exp:8
55              System.getProperty("foo"); //indent:12 exp:12
56              System.getProperty("foo"); //indent:12 exp:12
57          } //indent:8 exp:8
58  
59          while (test)  { //indent:8 exp:8
60              if (test) { //indent:12 exp:12
61                  System.getProperty("foo"); //indent:16 exp:16
62              } //indent:12 exp:12
63              System.getProperty("foo"); //indent:12 exp:12
64          } //indent:8 exp:8
65  
66          while (test) //indent:8 exp:8
67              System.getProperty("foo"); //indent:12 exp:12
68  
69          if (test) { //indent:8 exp:8
70              while (test) //indent:12 exp:12
71                  System.getProperty("foo"); //indent:16 exp:16
72          } //indent:8 exp:8
73  
74          while (test //indent:8 exp:8
75              && 4 < 7 && 8 < 9 //indent:12 exp:12
76              && 3 < 4) { //indent:12 exp:12
77          } //indent:8 exp:8
78  
79      } //indent:4 exp:4
80  
81  } //indent:0 exp:0