View Javadoc
1   /*
2   SeparatorWrap
3   option = NL
4   tokens = DOT, COMMA,ELLIPSIS, ARRAY_DECLARATOR, METHOD_REF
5   
6   */
7   
8   package com.puppycrawl.tools.checkstyle.checks.whitespace.separatorwrap;
9   
10  import java.util.Arrays;
11  
12  public class InputSeparatorWrapWithEmoji {
13      protected String[] s1 = new String[
14          /*πŸŽ„ with text */    ] {"aabπŸŽ„", "aπŸŽ„aπŸ‘ba"}; // violation above ''\[' should be on a new line'
15  
16      /* emojiπŸ‘array */ protected String[] s2 = new String[
17          ] {"πŸ₯³", "😠", "😨"}; // violation above''\[' should be on a new line'
18  
19      /*πŸ‘†πŸ» πŸ‘‡πŸ»*/ public void test1(String...
20                          parameters) { // violation above ''...' should be on a new line'
21      }
22  
23      public void test2(String
24                            /* πŸ‘ŒπŸ»πŸ‘ŒπŸ» */    ...parameters) { // ok
25          String s = "ffffooooString";
26          /* 🧐πŸ₯³ */ s.
27              isEmpty(); // violation above ''.' should be on a new line'
28          try {
29              test2("2", s);
30          } catch (Exception e) {}
31  
32          test1("1"
33              /*🧐 sda πŸ₯³ */   ,s); // ok
34  
35      }
36      void goodCase() {
37          String[] stringArray =
38              {
39                  "🌏", "πŸŒ”πŸŒŸ", "QWERTY", "πŸ§›πŸ»", "John",
40                  /*🀞🏻*/ }; // violation above '',' should be on a new line'
41          /*🀞🏻 🀞🏻*/ Arrays.sort(stringArray, String::
42              compareToIgnoreCase); // violation above ''::' should be on a new line'
43      }
44  }