KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > puppycrawl > tools > checkstyle > indentation > InputInvalidWhileIndent


1 /*
2  * InputValidWhileIndent.java
3  *
4  * Created on November 10, 2002, 9:16 PM
5  */

6
7 package com.puppycrawl.tools.checkstyle.indentation;
8
9 /**
10  *
11  * @author jrichard
12  */

13 public class InputInvalidWhileIndent {
14     
15     /** Creates a new instance of InputValidWhileIndent */
16     public InputInvalidWhileIndent() {
17     }
18     private void method1()
19     {
20         boolean test = true;
21          while (test) {
22        }
23
24        while (test)
25          {
26          }
27
28          while (test)
29       {
30               System.getProperty("foo");
31       }
32
33           while (test) {
34             System.getProperty("foo");
35           }
36         
37           while (test) {
38             System.getProperty("foo");
39             System.getProperty("foo");
40           }
41         
42       while (test)
43           {
44             System.getProperty("foo");
45             System.getProperty("foo");
46       }
47
48         while (test) { // TODO: this is allowed
49
if (test) {
50                   System.getProperty("foo");
51               }
52               System.getProperty("foo");
53           }
54         
55         while (test
56           && 4 < 7 && 8 < 9
57             && 3 < 4) {
58         }
59
60         while (test
61             && 4 < 7 && 8 < 9
62           && 3 < 4) {
63         }
64
65         while (test
66             && 4 < 7 && 8 < 9
67           && 3 < 4)
68         {
69         }
70         
71         while (test
72             && 4 < 7 && 8 < 9
73             && 3 < 4
74      ) {
75             
76         }
77         
78         while (test
79             && 4 < 7 && 8 < 9
80             && 3 < 4
81           ) {
82             
83         }
84
85         while (test
86             && 4 < 7 && 8 < 9
87             && 3 < 4
88           )
89         {
90             
91         }
92
93         while (true)
94         {
95         continue;
96         }
97     }
98     
99 }
100
Popular Tags