1
2
3
4
5
6
7
8
9 package com.puppycrawl.tools.checkstyle.checks.sizes.executablestatementcount;
10
11 public class InputExecutableStatementCountDefaultConfig {
12 public void foo() {
13 while (true) {
14 Runnable runnable = new Runnable() {
15 public void run() {
16 while (true) {
17 }
18 }
19 };
20
21 new Thread(runnable).start();
22 }
23 }
24
25 public void bar() {
26 if (System.currentTimeMillis() == 0) {
27 if (System.currentTimeMillis() == 0 && System.currentTimeMillis() == 0) {
28 }
29
30 if (System.currentTimeMillis() == 0 || System.currentTimeMillis() == 0) {
31 }
32 }
33 }
34
35 public void simpleElseIf() {
36 if (System.currentTimeMillis() == 0) {
37 } else if (System.currentTimeMillis() == 0) {
38 } else {
39 }
40 }
41
42 public void stupidElseIf() {
43 if (System.currentTimeMillis() == 0) {
44 } else {
45 if (System.currentTimeMillis() == 0) {
46 } else {
47 if (System.currentTimeMillis() == 0) {
48 }
49 }
50
51 if (System.currentTimeMillis() == 0) {
52 }
53 }
54 }
55
56 public InputExecutableStatementCountDefaultConfig()
57 {
58 int i = 1;
59 if (System.currentTimeMillis() == 0) {
60 } else if (System.currentTimeMillis() == 0) {
61 } else {
62 }
63 }
64
65
66 static {
67 int i = 1;
68 if (System.currentTimeMillis() == 0) {
69 } else if (System.currentTimeMillis() == 0) {
70 } else {
71 }
72 }
73
74
75 {
76 int i = 1;
77 if (System.currentTimeMillis() == 0) {
78 } else if (System.currentTimeMillis() == 0) {
79 } else {
80 }
81 }
82
83
84 public InputExecutableStatementCountDefaultConfig(int aParam)
85 {
86 Runnable runnable = new Runnable() {
87 public void run() {
88 while (true) {
89 }
90 }
91 };
92 new Thread(runnable).start();
93 }
94
95
96 public InputExecutableStatementCountDefaultConfig(String someString) {}
97
98 static Runnable r1 = () -> {
99 String.valueOf("Hello world one!");
100 };
101 }