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.io.IOException;
16
17 public class InputEmptyLineSeparatorRecursive {
18
19 int foo1() throws Exception {
20 int a = 1;
21 int b = 2;
22 try {
23 if (a != b) {
24 throw new IOException();
25 }
26 // empty lines below should cause a violation
27 // violation 'There is more than 1 empty line after this line.'
28
29
30 } catch(IOException e) {
31 System.out.println("IO error: " + e.getMessage());
32 return 1;
33 }
34 return 0;
35 }
36 }