View Javadoc
1   /*xml
2   <module name="Checker">
3     <module name="TreeWalker">
4       <module name="RedundantImport"/>
5     </module>
6   </module>
7   */
8   
9   package com.puppycrawl.tools.checkstyle.checks.imports.redundantimport;
10  
11  // xdoc section -- start
12  import static com.puppycrawl.tools.checkstyle.checks.imports.redundantimport.Example1.*; // OK, static import
13  import static java.lang.Integer.MAX_VALUE; // OK, static import
14  
15  // violation below, 'Redundant import from the same package'
16  import com.puppycrawl.tools.checkstyle.checks.imports.redundantimport.Example1;
17  import java.lang.String; // violation, "Redundant import from the java.lang package"
18  import java.util.Scanner;
19  import java.util.Scanner; // violation 'Duplicate import to line 18 - java.util.Scanner'
20  
21  public class Example1{ }
22  // xdoc section -- end
23