1 /*xml
2 <module name="Checker">
3 <module name="TreeWalker">
4 <module name="IllegalThrows">
5 <property name="ignoreOverriddenMethods" value="false"/>
6 </module>
7 </module>
8 </module>
9 */
10 package com.puppycrawl.tools.checkstyle.checks.coding.illegalthrows;
11
12 // xdoc section -- start
13 public class Example4 {
14 void f1() throws RuntimeException {} // violation
15 void f2() throws Exception {}
16 void f3() throws Error {} // violation
17 void f4() throws Throwable {} // violation
18 void f5() throws NullPointerException {}
19 @Override
20 public String toString() throws Error { // violation
21 String str = "";
22 return str;
23 }
24 }
25 // xdoc section -- end