View Javadoc
1   /*
2   MethodParamPad
3   allowLineBreaks = true
4   option = (default)nospace
5   tokens = (default)CTOR_DEF, LITERAL_NEW, METHOD_CALL, METHOD_DEF, SUPER_CTOR_CALL, \
6            ENUM_CONSTANT_DEF, RECORD_DEF,RECORD_PATTERN_DEF
7   
8   
9   */
10  
11  package com.puppycrawl.tools.checkstyle.checks.whitespace.methodparampad;
12  
13  import java.util.Arrays;
14  
15  
16  public class InputMethodParamPadCheckWithEmoji {
17  
18      class MyTestRecord {
19          private boolean equal (Object obj) { // violation ''(' is preceded with whitespace.'
20              String value = "😂🎄da";
21              if( value.equals ("🎄d") ) { // violation ''(' is preceded with whitespace.'
22                  return true;
23              }
24              return value.
25                      equals ( "😂" + // violation ''(' is preceded with whitespace.'
26                      "d" );
27          }
28  
29      }
30  
31      public void test() {
32          java.lang.Integer.parseInt ("😆 🤛🏻 "); // violation ''(' is preceded with whitespace.'
33          java.lang.Integer.parseInt
34                  ("0 🤛🏻 asd asd");
35  
36          java.util.Vector<String> v = new java. util. Vector <String> (
37                  // violation above ''(' is preceded with whitespace.'
38                  Arrays.asList ("a😂s😂d")); // violation ''(' is preceded with whitespace.'
39      }
40  
41      public  void test2 () { // violation ''(' is preceded with whitespace.'
42          Comparable
43                  <
44                          String
45                          >
46                  c = new
47                  String (    "🎄d👆🏻👇🏻😂"); // violation ''(' is preceded with whitespace.'
48      }
49  
50      public void test3 () { // violation ''(' is preceded with whitespace.'
51  /* 🤛🏻OK 👍👆🏻*/        if ( "🤛🏻😂" ==
52                  "👆🏻👇🏻") {
53  
54          }
55      }
56  
57      void           /* 🧐🧐dsds🧐🧐🧐dsds🧐🧐🧐dsds🧐 { */                              method4()
58      {
59      }
60  }