View Javadoc
1   package com.puppycrawl.tools.checkstyle.checks.design.mutableexception;
2   
3   public class InputMutableException {
4       public class FooException extends Exception {
5           private final int finalErrorCode;
6           private int errorCode = 1;
7   
8           public FooException() {
9               finalErrorCode = 1;
10          }
11  
12          public class FooExceptionThisIsNot extends RuntimeException {
13              private final int finalErrorCode;
14              private int errorCode = 1;
15              /** constructor */
16              public FooExceptionThisIsNot() {
17                  finalErrorCode = 1;
18              }
19          }
20      }
21  
22      public class BarError extends Throwable {
23          private int errorCode;
24      }
25  
26      public class BazDoesNotExtendError {
27          private int errorCode;
28      }
29  
30      public class CustomProblem extends ThreadDeath {
31          private int errorCode;
32  
33          public class CustomFailure extends ThreadDeath {
34              private int errorCode;
35              public void someMethod() {
36                  if(true) {
37                      final int i = 0;
38                  }
39              } 
40          }
41      }
42  
43      class CustomException extends java.lang.Exception {}
44  
45      class CustomMutableException extends java.lang.Exception {
46          int errorCode;
47      }
48  }