Skip to content

Commit

Permalink
Issue checkstyle#13007: Update doc for UnusedImports
Browse files Browse the repository at this point in the history
  • Loading branch information
TanayMorakhia committed Apr 25, 2023
1 parent 439e4f9 commit e993e7e
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 27 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@
* An imported type has the same name as a declaration, such as a member variable.
* </li>
* <li>
* There are two or more imports with the same name.
* There are two or more static imports with the same method name.
* </li>
* </ul>
* <p>
Expand Down Expand Up @@ -109,20 +109,18 @@
* <pre>
* import demo.Demo; // violation, Unused import - demo.Demo
*
* import java.lang.String; // violation, Unused import - java.lang.String
* import java.lang.String; // violation
*
* import java.util.Stack; // OK
* import java.util.Map; // violation, Unused import - java.util.Map
* import java.util.Map; // violation
*
* import java.util.List; // OK
*
* &#47;&#42;&#42;
* &#42; @link List
* &#42; &#64;link List
* &#42;&#47;
* class MyClass{
* public static void main(String args[]){
* Stack stack = new Stack();
* }
* }
* </pre>
* <p>
Expand All @@ -137,20 +135,18 @@
* <pre>
* import demo.Demo; // violation, Unused import - demo.Demo
*
* import java.lang.String; // violation, Unused import - java.lang.String
* import java.lang.String; // violation
*
* import java.util.Stack; // OK
* import java.util.Map; // violation, Unused import - java.util.Map
* import java.util.Map; // violation
*
* import java.util.List; // violation, Unused import - java.util.List
* import java.util.List; // violation
*
* &#47;&#42;&#42;
* &#42; @link List
* &#42; &#64;link List
* &#42;&#47;
* class MyClass{
* public static void main(String args[]){
* Stack stack = new Stack();
* }
* }
* </pre>
* <p>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
An imported type has the same name as a declaration, such as a member variable.
&lt;/li&gt;
&lt;li&gt;
There are two or more imports with the same name.
There are two or more static imports with the same method name.
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;
Expand Down
24 changes: 10 additions & 14 deletions src/xdocs/config_imports.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2494,7 +2494,7 @@ public class MyClass{ };
An imported type has the same name as a declaration, such as a member variable.
</li>
<li>
There are two or more imports with the same name.
There are two or more static imports with the same method name.
</li>
</ul>
<p>
Expand Down Expand Up @@ -2545,20 +2545,18 @@ class FooBar {
<source>
import demo.Demo; // violation, Unused import - demo.Demo

import java.lang.String; // violation, Unused import - java.lang.String
import java.lang.String; // violation

import java.util.Stack; // OK
import java.util.Map; // violation, Unused import - java.util.Map
import java.util.Map; // violation

import java.util.List; // OK

&#47;&#42;&#42;
&#42; @link List
&#42; &#64;link List
&#42;&#47;
class MyClass{
public static void main(String args[]){
Stack stack = new Stack();
}
Stack stack = new Stack();
}
</source>
<p>
Expand All @@ -2573,20 +2571,18 @@ class MyClass{
<source>
import demo.Demo; // violation, Unused import - demo.Demo

import java.lang.String; // violation, Unused import - java.lang.String
import java.lang.String; // violation

import java.util.Stack; // OK
import java.util.Map; // violation, Unused import - java.util.Map
import java.util.Map; // violation

import java.util.List; // violation, Unused import - java.util.List
import java.util.List; // violation

&#47;&#42;&#42;
&#42; @link List
&#42; &#64;link List
&#42;&#47;
class MyClass{
public static void main(String args[]){
Stack stack = new Stack();
}
Stack stack = new Stack();
}
</source>
</subsection>
Expand Down

0 comments on commit e993e7e

Please sign in to comment.