View Javadoc
1   package com.puppycrawl.tools.checkstyle.checks.whitespace.whitespacearound;
2   
3   public class InputWhitespaceAroundCatch {
4       public int case1(int i) {
5           int k = 1;
6           try {
7               k = 5 / i;
8           } catch (ArithmeticException ex) {}
9           return k;
10      }
11  
12      public int case2(int i) {
13          int k = 1;
14          try {
15              k = 10 / i;
16          } catch (ArithmeticException ex) {   }
17          return k;
18      }
19  
20      public int case3(int i) {
21          int k = 1;
22          try {
23              k = 15 / i;
24          } catch (ArithmeticException ex) {
25  
26          }
27          return k;
28      }
29  
30      public int case4(int i) {
31          int k = 1;
32          try {
33              k = 20 / i;
34          } catch (ArithmeticException ex) {
35              // This is expected
36          }
37          return k;
38      }
39  }