1 /* 2 EmptyLineSeparator 3 allowNoEmptyLineBetweenFields = (default)false 4 allowMultipleEmptyLines = (default)true 5 allowMultipleEmptyLinesInsideClassMembers = false 6 tokens = (default)PACKAGE_DEF, IMPORT, STATIC_IMPORT, CLASS_DEF, INTERFACE_DEF, ENUM_DEF, \ 7 STATIC_INIT, INSTANCE_INIT, METHOD_DEF, CTOR_DEF, VARIABLE_DEF, RECORD_DEF, \ 8 COMPACT_CTOR_DEF 9 10 11 */ 12 13 package com.puppycrawl.tools.checkstyle.checks.whitespace.emptylineseparator; 14 15 import java.util.ArrayList; 16 17 public class InputEmptyLineSeparatorNewMethodDef { 18 private static final int MULTIPLICATOR; 19 20 void processOne() { 21 22 int a; 23 24 int b; 25 26 new ArrayList<String>() { 27 { 28 add("String One"); 29 add("String Two"); // violation 'There is more than 1 empty line after this line.' 30 31 32 add("String Three"); 33 } 34 }.add("String Four"); 35 } 36 37 static { // violation below 'There is more than 1 empty line after this line.' 38 MULTIPLICATOR = 5; 39 40 41 } 42 43 }