1 /*
2 MatchXpath
3 query = //METHOD_DEF[count(./SLIST/*) > 2]
4 message.matchxpath.match = Executable number of statements exceed threshold
5
6
7 */
8
9 package com.puppycrawl.tools.checkstyle.checks.coding.matchxpath;
10
11 public class InputMatchXpathExecutableStatementCount {
12 public void test() {
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 test2() { // violation
26 test();
27 "HELLO WORLD".toString();
28 int a = 123;
29 }
30 }