aboutsummaryrefslogtreecommitdiff
path: root/src/it/resources/com/google/checkstyle/test/chapter5naming/rule51identifiernames/InputCatchParameterName.java
blob: acb175a8ea8d2d945fd87e33def66d3775574eee (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
package com.google.checkstyle.test.chapter5naming.rule51identifiernames;

public class InputCatchParameterName {
    {
        try {
        } catch (Exception e) { // warn
        }
        try {
        } catch (Exception ex) { // ok
        }
        try {
        } catch (Error | Exception err) { // ok
        }
        try {
        } catch (Exception exception) { // ok
        }
        try {
        } catch (Exception exception1) { // ok
        }
        try {
        } catch (Exception noWorries) { // ok
        }
        try {
        } catch (Throwable t) { // warn
        }
        try {
            throw new InterruptedException("interruptedException");
        } catch (InterruptedException ie) { // ok
        }
        try {
        } catch (Exception ok) { // ok
            // appropriate to take no action here
        }
        try {
        } catch (Exception e1) { // ok
            try {
            } catch (Exception e2) { // ok
            }
        }
        try {
        } catch (Throwable t1) { // ok
            try {
            } catch (Throwable t2) { // ok
            }
        }
        try {
        } catch (Exception iException) { // warn
        }
        try {
        } catch (Exception x) { // warn
        }
    }
}