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