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