1   package com.puppycrawl.tools.checkstyle.checks.whitespace.separatorwrap;
2   
3   public class InputSeparatorWrapForTestComma<T extends FooForTestComma
4           & BarForTestComma> {
5       public void goodCase() throws FooException4TC, BarException4TC
6       {
7           int i = 0;
8           String s = "ffffooooString";
9           s
10                  .isEmpty(); //good wrapping
11          s.isEmpty();
12          try {
13              foo(i, s);
14          } catch (FooException4TC |
15                  BarException4TC e) {}
16          foo(i,
17                  s); //good wrapping
18      }
19      public static void foo(int i, String s) throws FooException4TC, BarException4TC
20      {
21  
22      }
23  }
24  
25  class badCaseForTestComma<T extends FooForTestComma &  BarForTestComma> {
26  
27  
28      public void goodCaseForTestComma(int... aFoo) throws FooException4TC, BarException4TC
29      {
30          String s = "ffffooooString";
31          s.
32                  isEmpty(); //bad wrapping
33          try {
34              foo(1, s);
35          } catch (FooException4TC
36                  | BarException4TC e) {}
37  
38          foo(1
39                  ,s);  //bad wrapping
40          int[] i;
41      }
42      public static String foo(int i, String s) throws FooException4TC, BarException4TC
43      {
44          return new StringBuilder("")
45                  .append("", 0, 1)
46                  .append("")
47                  .toString();
48      }
49  }
50  
51  interface FooForTestComma {
52  
53  }
54  
55  interface BarForTestComma {
56  
57  }
58  
59  class FooException4TC extends Exception {
60  
61  }
62  
63  class BarException4TC extends Exception {
64  
65  }