1
2
3
4
5
6
7
8
9
10
11 package com.puppycrawl.tools.checkstyle.checks.avoidescapedunicodecharacters;
12
13 public class InputAvoidEscapedUnicodeCharacters5 {
14 private String a = "π";
15 private String b = "\uD83E\uDD73absπ";
16 private String c = "\uD83C\uDF84π\uD83C\uDF84";
17
18 private String d = "\uD83C\uDF84π\uD83C\uDF84asdas\uD83C\uDF84abcd";
19
20 public Object fooEmoji() {
21 String unitAbbrev = "ΓΒΌsΓ°π";
22 String unitAbbrev2 = "\u03bcπ";
23 String unitAbbrev3 = "π\u03bcs";
24 String fakeUnicode2 = "\\u23\\u123i\\uπ";
25 String content = null;
26 return "π" + content + "\u03bc";
27 }
28
29 public boolean matches(String c) {
30 switch (c) {
31
32 case "\u03bcπ":
33 case "π\u03bc":
34
35 case "\t\u2028":
36
37 case "\nπ\u3000":
38 return true;
39
40 case "π\uD83D\uDE02":
41 return false;
42 default:
43 return c.equals("\u2000π\u2000");
44 }
45 }
46 }