View Javadoc
1   /*xml
2   <module name="Checker">
3     <module name="TreeWalker">
4       <module name="EmptyLineSeparator">
5         <property name="allowNoEmptyLineBetweenFields" value="true"/>
6         <property name="allowMultipleEmptyLines" value="false"/>
7         <property name="allowMultipleEmptyLinesInsideClassMembers" value="false"/>
8       </module>
9     </module>
10  </module>
11  */
12  
13  package com.puppycrawl.tools.checkstyle.checks.whitespace.emptylineseparator;
14  
15  import javax.annotation.Nullable;
16  
17  public class InputEmptyLineSeparatorWithJavadoc2 {
18  
19    public static class Good {
20        /** my javadoc */
21        public int [][] myInt = null;
22  
23        /** my javadoc */
24        public int myOtherInt[][] = null;
25  
26        /**
27          * My javadoc...
28          */
29        public static
30            int [][] test10() throws Exception {
31          return new int [][] {};
32        }
33  
34        /**
35          * My javadoc...
36          *
37          */
38        public static
39            int [] test11() throws Exception {
40          return new int [] {};
41        }
42  
43          /**
44          * My javadoc...
45          *
46          */
47        public static
48            int [] test12() throws Exception {
49          return new int [] {};
50        }
51  
52          /**
53          * My javadoc...
54          *
55          */
56        public static
57            @Nullable int [] test13() throws Exception {
58          return new int [] {};
59        }
60    }
61  
62    public static class Bad {
63  
64  
65      /** my javadoc */
66      public int [][] myInt = null;
67      // violation 2 lines above "has more than 1 empty lines before"
68  
69  
70      /** my javadoc */
71      public int myOtherInt[][] = null;
72      // violation 2 lines above "has more than 1 empty lines before"
73  
74  
75      /**
76        * My javadoc...
77        */
78      public static
79          int [][] test10() throws Exception {
80        // violation 5 lines above "has more than 1 empty lines before"
81        return new int [][] {};
82      }
83  
84  
85      /**
86        * My javadoc...
87        *
88        */
89      public static
90          int [] test11() throws Exception {
91        // violation 6 lines above "has more than 1 empty lines before"
92        return new int [] {};
93      }
94  
95  
96        /**
97        * My javadoc...
98        *
99        */
100     public static
101         int [] test12() throws Exception {
102       // violation 6 lines above "has more than 1 empty lines before"
103       return new int [] {};
104     }
105 
106 
107       /**
108       * My javadoc...
109       *
110       */
111     public static
112         @Nullable int [] test13() throws Exception {
113       // violation 6 lines above "has more than 1 empty lines before"
114       return new int [] {};
115     }
116 
117   }
118 }