1 /* 2 IllegalThrows 3 illegalClassNames = (default)Error, RuntimeException, Throwable, java.lang.Error, \ 4 java.lang.RuntimeException, java.lang.Throwable 5 ignoredMethodNames = (default)finalize 6 ignoreOverriddenMethods = (default)true 7 8 9 */ 10 11 package com.puppycrawl.tools.checkstyle.checks.coding.illegalthrows; 12 13 public class InputIllegalThrowsTestDefault { 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 // violation below, 'Throwing 'java.lang.RuntimeException' is not allowed' 24 public void methodTwo() throws java.lang.RuntimeException, 25 java.lang.Error // violation, 'Throwing 'java.lang.Error' is not allowed' 26 { 27 } 28 29 public void finalize() throws Throwable { 30 31 } 32 }