aboutsummaryrefslogtreecommitdiff
path: root/src/it/resources/com/google/checkstyle/test/chapter5naming
diff options
context:
space:
mode:
Diffstat (limited to 'src/it/resources/com/google/checkstyle/test/chapter5naming')
-rw-r--r--src/it/resources/com/google/checkstyle/test/chapter5naming/rule51identifiernames/InputCatchParameterName.java53
1 files changed, 53 insertions, 0 deletions
diff --git a/src/it/resources/com/google/checkstyle/test/chapter5naming/rule51identifiernames/InputCatchParameterName.java b/src/it/resources/com/google/checkstyle/test/chapter5naming/rule51identifiernames/InputCatchParameterName.java
new file mode 100644
index 000000000..acb175a8e
--- /dev/null
+++ b/src/it/resources/com/google/checkstyle/test/chapter5naming/rule51identifiernames/InputCatchParameterName.java
@@ -0,0 +1,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
+ }
+ }
+}