View Javadoc
1   /*
2   CommentsIndentation
3   tokens = BLOCK_COMMENT_BEGIN
4   
5   
6   */
7   
8   // comment
9   package com.puppycrawl.tools.checkstyle.checks.indentation.commentsindentation;
10  
11  // some
12  public class InputCommentsIndentationSurroundingCode3Two {
13  
14      public void foo8() {
15          String s = new String(); // comment
16          // ...
17          // block
18          // ...
19          String someStr = new String();
20      }
21  
22  
23      public String foo9(String s1, String s2, String s3) {
24          return "";
25      }
26  
27      public void foo10()
28              throws Exception {
29  
30          final String pattern = "^foo$";
31  
32          final String[] expected = {
33                  "7:13: " + foo9("", "", ""),
34                  // comment
35          };
36      }
37  
38      public void foo11() {
39          // violation below '.* incorrect .* level 12, expected is 8, .* same .* as line 41.'
40              /* some comment */
41          hashCode();
42      }
43  
44      public void foo12() {
45          // violation below '.* incorrect .* level 4, expected is 8, .* same .* as line 47.'
46      /* some comment */
47          hashCode();
48      }
49  
50      public void foo13() {
51          hashCode();
52          // violation below '.* incorrect .* level 4, expected is 8, .* same .* as line 51.'
53      /* some comment */
54      }
55  
56      public void foo14() {
57          hashCode();
58          /*
59  
60          Test
61          */
62          // Test
63      }
64  
65      public InputCommentsIndentationSurroundingCode3Two() {
66      }
67  }// The Check should not throw NPE here!
68  // The Check should not throw NPE here!