View Javadoc
1   /*
2   EmptyForInitializerPad
3   option = space
4   
5   
6   */
7   
8   package com.puppycrawl.tools.checkstyle.checks.whitespace.emptyforinitializerpad;
9   
10  public class InputEmptyForInitializerPadWithEmoji {
11  
12      void method1() {
13          String s = "asdda🤩🎄🧐";
14          int j = 0;
15          for (int i = 0; i < s.length() && s.substring(i) == "🤩🎄🧐" ; ) {
16  
17          }
18  
19          for (int i = 0; i < s.length() && s.substring(i) == "🤩🎄🧐asd";i++) {
20  
21          }
22  
23          for(;j < s.length() && // violation '';' is not preceded with whitespace'
24                  s.substring(j) =="🤩🎄";) {
25  
26          }
27  
28          s = "🤩a🤩"; for (;j <s.length() // violation '';' is not preceded with whitespace.'
29                  && s.substring(j) =="🤩🧐";
30                j++ ) {
31  
32          }
33  
34          s = "da🤩da🤩"; for (  ;
35                j < s.length() && s.substring(j) == "🤩🎄🧐"
36                  ;
37                j++ ) {
38  
39          }
40      }
41  }