1
2
3
4
5
6
7
8 package com.puppycrawl.tools.checkstyle.checks.whitespace.whitespaceafter;
9
10 public class InputWhitespaceAfterLiteralWhile {
11
12 boolean condition() {
13 return false;
14 }
15
16 void testIfElse() {
17
18 if (condition()) {
19 testIfElse();
20 } else {
21 testIfElse();
22 }
23
24
25 if(condition()) {
26 testIfElse();
27 } else {
28 testIfElse();
29 }
30
31
32 if (condition()) {
33 testIfElse();
34 } else{
35 testIfElse();
36 }
37 }
38
39 void testWhile() {
40
41 while (condition()) {
42 testWhile();
43 }
44
45
46 while(condition()) {
47 testWhile();
48 }
49 }
50
51 void testFor() {
52
53 for (int i = 0; i < 5; i++) {
54 testFor();
55 }
56
57
58 for(int i = 0; i < 5; i++) {
59 testFor();
60 }
61 }
62
63 void testDo() {
64
65 do {
66 testDo();
67 } while (condition());
68
69
70 do{
71 testDo();
72 } while (condition());
73 }
74 }