1 /*xml 2 <module name="Checker"> 3 <module name="TreeWalker"> 4 <module name="AvoidEscapedUnicodeCharacters"> 5 <property name="allowByTailComment" value="true"/> 6 </module> 7 </module> 8 </module> 9 */ 10 11 package com.puppycrawl.tools.checkstyle.checks.avoidescapedunicodecharacters; 12 13 // xdoc section -- start 14 public class Example3 { 15 // OK, a normal String below 16 String unitAbbrev = "μs"; 17 // violation below 18 String unitAbbrev1 = "\u03bcs"; 19 // violation below 20 String unitAbbrev2 = "\u03bc\u03bc\u03bc"; 21 // violation below 22 String unitAbbrev3 = "\u03bcs"; 23 // ok, because there is trailing comment and allowByTailComment=true 24 String unitAbbrev4 = "\u03bc\u03bcs"; // it is μs 25 public static int content() { 26 char content = 'r'; 27 // violation below 28 return '\ufeff' + content; 29 } 30 } 31 // xdoc section -- end