1
2
3
4
5
6
7
8
9 package com.puppycrawl.tools.checkstyle.checks.coding.fallthrough;
10
11 public class InputFallThroughWithEmoji {
12
13 void foo() {
14
15 while (true) {
16 int i = 0;
17 switch ("👍") {
18 case "ds😂":
19 case "": i++; break;
20 case "👇🏻":
21 i++;
22 case "😂sda":
23
24 i++;
25 case "d😂sda": return;
26
27
28 case "5😆": throw new RuntimeException("");
29 case "🧐6":
30 do {
31 System.identityHashCode("something");
32 return;
33 } while(true);
34 case "7🤛🏻":
35 for (int j1 = 0; j1 < 10; j1++) {
36 String.valueOf("something");
37 "7🤛🏻".toString(); return;
38 }
39 case "8🥳": try {
40 i++;
41 String s ="8🥳"; break;
42 } catch (RuntimeException e) {
43 i--;
44
45 } finally {
46 i++;
47 }
48
49 case "9": String s = "s🥳d🥳s";
50
51
52 default:
53 "🥳".toString().equals("🥳");
54
55
56 i++;
57 }
58 }
59 }
60
61 void fooFallThru() {
62 int i = 0;
63 switch ("") {
64
65 case "ds😂":
66 case "":
67 i++;
68 break;
69 case "👇🏻": i++;
70
71
72 case "😂sda":
73 i++;
74
75 case "dsda":
76 return;
77 case "5😆":
78 throw new RuntimeException("");
79 case "🧐6":
80 do {
81 System.identityHashCode("something");
82
83 } while(true);
84
85 case "7🤛🏻": for (int j1 = 0; j1 < 10; j1++) {
86 String.valueOf("something");
87 return;
88 }
89 case "8🥳": try { break;
90 } catch (RuntimeException e) {
91 i--;
92 break;
93 } finally {
94 i++;
95 }
96 case "9": String s = "s🥳d🥳s";
97
98
99 case "10": String s2 = "s🥳d🥳s";
100 default: i++;
101
102 }
103 }
104 }