View Javadoc
1   /*xml
2   <module name="Checker">
3     <module name="RegexpSingleline">
4       <property name="format" value="System.exit\("/>
5       <!-- next line not required as 0 is the default -->
6       <property name="minimum" value="0"/>
7       <property name="maximum" value="1"/>
8     </module>
9   </module>
10  */
11  package com.puppycrawl.tools.checkstyle.checks.regexp.regexpsingleline;
12  // xdoc section -- start
13  public class Example2 {
14    void myFunction() {
15      try {
16        doSomething();
17      } catch (Exception e) {
18        System.exit(1); // OK, as only there is only one occurrence.
19      }
20    }
21  
22    void doSomething(){}
23  }
24  // xdoc section -- end