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