1 /* 2 MatchXpath 3 query = //INSTANCE_INIT[not(../*[not(\n self::LCURLY or\n \ 4 self::INSTANCE_INIT or\n self::RCURLY or\n \ 5 self::SINGLE_LINE_COMMENT or\n self::BLOCK_COMMENT_BEGIN\ 6 \n )])] 7 message.matchxpath.match = Do not use double-brace initialization 8 9 10 */ 11 12 package com.puppycrawl.tools.checkstyle.checks.coding.matchxpath; 13 14 import java.util.ArrayList; 15 16 public class InputMatchXpathDoubleBrace { 17 public void test() { 18 new ArrayList<Integer>() {{ // violation 19 add(2); 20 add(4); 21 add(6); 22 }}; 23 } 24 }