1
2
3
4
5
6
7
8
9
10
11 package com.puppycrawl.tools.checkstyle.checks.whitespace.operatorwrap;
12
13 import java.util.Arrays;
14
15
16
17
18
19 class InputOperatorWrap2
20 {
21 void test()
22 {
23 int x = 1 +
24 2 -
25 3
26 -
27 4;
28 x = x + 2;
29 boolean y = true
30 &&
31 false;
32 y = true &&
33 false;
34 y = false
35 && true;
36 Arrays.sort(null, String
37 ::
38 compareToIgnoreCase);
39 Arrays.sort(null, String::
40 compareToIgnoreCase);
41 Arrays.sort(null, String
42 ::compareToIgnoreCase);
43 }
44
45 void testAssignment()
46 {
47 int x
48 = 0;
49 int y =
50 0;
51 }
52
53 <
54 T extends Comparable &
55 java.io.Serializable
56 >
57 void testGenerics1()
58 {
59 Comparable
60 <
61 String
62 >
63 c = new String();
64 }
65 }
66
67 class badCase22<T extends Foo2 &
68 Bar2> {
69 }
70
71 class goodCase2<T extends Foo2 & Bar2> {
72 }
73
74 class Switch2 {
75 public void test(int i, int j) {
76 switch(j) {
77 case 7:
78 return;
79 }
80 switch(i) {
81 case 1:
82 break;
83 default:
84 ;
85 }
86 for (int k : new int[]{1,2,3}) {}
87 }
88 }
89
90 interface Foo2 {}
91 interface Bar2 {}