1 /* 2 IllegalThrows 3 illegalClassNames = (default)Error, RuntimeException, Throwable, java.lang.Error, \ 4 java.lang.RuntimeException, java.lang.Throwable 5 ignoredMethodNames = methodTwo 6 ignoreOverriddenMethods = (default)true 7 8 9 */ 10 11 package com.puppycrawl.tools.checkstyle.checks.coding.illegalthrows; 12 13 public class InputIllegalThrowsIgnoreMethodNames { 14 15 public void method() throws NullPointerException 16 { // no code 17 } 18 // violation below, 'Throwing 'RuntimeException' is not allowed' 19 public java.lang.Throwable methodOne() throws RuntimeException 20 { 21 return null; 22 } 23 24 public void methodTwo() throws java.lang.RuntimeException, java.lang.Error 25 { 26 } 27 28 public void finalize() throws Throwable { // violation, 'Throwable' is not allowed' 29 30 } 31 }