1
2
3
4
5
6
7
8
9
10
11
12
13
14 package com.puppycrawl.tools.checkstyle.checks.blocks.leftcurly;
15
16 import org.junit.jupiter.api.function.ThrowingConsumer;
17
18 import java.net.InetSocketAddress;
19 import java.net.Socket;
20 import java.util.*;
21 import java.util.List;
22
23 public class InputLeftCurlyCommentBeforeLeftCurly2 {
24
25 private long[] countList;
26
27 void method1()
28 {
29 }
30
31 void method2()
32 {
33 if (!Arrays.equals(this.countList, countList)
34 ) {
35 }
36 }
37
38 void method3()
39 { }
40
41
42 InputLeftCurlyCommentBeforeLeftCurly2() { }
43
44 InputLeftCurlyCommentBeforeLeftCurly2(int data)
45 { }
46 }
47
48 class Class {
49 private
50 class Node {
51 int data;
52 Node next;
53 Node(int data)
54 {
55 this.data = data;
56 }
57 }
58
59 String s = "🧐 🧐";
60 private void foo3(String s) {
61 if ("🧐".isEmpty()) {
62 }
63 }
64
65 List<ThrowingConsumer<InetSocketAddress>> targets = List.of(
66 (a) -> {Socket s = new Socket();},
67
68 (b) -> {
69 Socket s = new Socket();
70 }
71 );
72 }
73
74 class Nothing {
75 void method() {
76 int a = 9;int b = 9;
77 if(a == 0 && b == 0
78 ) {}
79 }
80
81 public void test2(String
82 ...para) {
83 }
84
85 public void test3(String line) {
86
87 int index=0;
88 if (line.regionMatches(index, "/**", 0, "/**".length())) {
89 index += 2;
90 }
91 else if (line.regionMatches(index, "*/", 0, 2)) {
92 index++;
93 }
94 }
95 }