1 /*xml 2 <module name="Checker"> 3 <module name="TreeWalker"> 4 <module name="NoArrayTrailingComma"/> 5 </module> 6 </module> 7 */ 8 package com.puppycrawl.tools.checkstyle.checks.coding.noarraytrailingcomma; 9 10 // xdoc section -- start 11 class Example1 { 12 void InvalidExample() { 13 String[] foo1 = { 14 "FOO", 15 "BAR", // violation, 'Array should not contain trailing comma' 16 }; 17 // violation below, 'Array should not contain trailing comma' 18 String[] foo2 = { "FOO", "BAR", }; 19 String[] foo3 = { 20 "FOO", 21 "BAR" 22 }; 23 String[] foo4 = { "FOO", "BAR" }; 24 } 25 } 26 // xdoc section -- end