aboutsummaryrefslogtreecommitdiff
path: root/src/test/resources/com/puppycrawl/tools/checkstyle/checks/naming/InputCatchOnly.java
diff options
context:
space:
mode:
authorrnveach <rveach02@gmail.com>2015-10-15 22:53:56 -0400
committerrnveach <rveach02@gmail.com>2015-10-16 18:13:31 -0400
commitbf529ef600fa9ef2034d0412c198b2121f2b94f2 (patch)
tree67c91bbe5623976acc64b8ae64351130171c37f7 /src/test/resources/com/puppycrawl/tools/checkstyle/checks/naming/InputCatchOnly.java
parent61f8aaca7bcb8750909bcc95eb5c27c72c7d824d (diff)
downloadcheckstyle-bf529ef600fa9ef2034d0412c198b2121f2b94f2.tar.gz
Issue #2161: unify test input locations for blocks package
Diffstat (limited to 'src/test/resources/com/puppycrawl/tools/checkstyle/checks/naming/InputCatchOnly.java')
-rw-r--r--src/test/resources/com/puppycrawl/tools/checkstyle/checks/naming/InputCatchOnly.java34
1 files changed, 34 insertions, 0 deletions
diff --git a/src/test/resources/com/puppycrawl/tools/checkstyle/checks/naming/InputCatchOnly.java b/src/test/resources/com/puppycrawl/tools/checkstyle/checks/naming/InputCatchOnly.java
new file mode 100644
index 000000000..ac1a01a11
--- /dev/null
+++ b/src/test/resources/com/puppycrawl/tools/checkstyle/checks/naming/InputCatchOnly.java
@@ -0,0 +1,34 @@
+package com.puppycrawl.tools.checkstyle.checks.naming;
+
+/**
+ * Test case for skipping over catch names.
+ **/
+public class InputCatchOnly {
+ int foo() {
+ if (System.currentTimeMillis() > 1000)
+ return 1;
+
+ int test = 0;
+
+ try
+ {
+ return 1;
+ }
+ catch (Exception e)
+ {
+ return 0;
+ }
+ }
+
+ public InputCatchOnly()
+ {
+ return;
+ }
+
+ class InnerFoo
+ {
+ public void fooInnerMethod ()
+ {
+ }
+ }
+}