View Javadoc
1   /*xml
2   <module name="Checker">
3     <module name="LineLength"/>
4   </module>
5   */
6   // xdoc section -- start
7   package com.puppycrawl.tools.checkstyle.checks.sizes.linelength;
8   
9   import static com.puppycrawl.tools.checkstyle.checks.sizes.LineLengthCheck.MSG_KEY;
10  
11  /**
12   * This is a short Javadoc comment.
13   * ThisJavadocCommentIsAReallyLongWordThatExceedsDefaultLineLimitOfEightyCharacters.
14   */
15  class Example1 {
16    //violation 3 lines above 'Line is longer than 80 characters'
17    void testMethod(String str) {
18      str = MSG_KEY;
19      System.out.println("This is a short line.");
20      // violation below, 'Line is longer than 80 characters'
21      System.out.println("This line is long and exceeds the default limit of 80 characters.");
22    }
23  }
24  // xdoc section -- end