Inspection gadget bug

If IG is configured to show unused imports (and why does IG even care, it's a native check in IDEA, no?), it will flag imports as unused that are used only in any of the non-public classes in a file.

That is, if you have 2 classes defined, your public class and others, IG will show imports as unused if they are needed only in the "other" classes.

Furthermore, using the intention to change the option warps you to the IDEA version of the check, and not the IG one.

3 comments
Comment actions Permalink

Ah-ha! This explains what I've been seeing.

I thought that IDEA's own inspection was showing false positives for unused
imports.

I just turned off IG's 'unused import' and turned on IntelliJ's own 'unused
import' and now no more false positives.


"Michael Campbell" <michael_s_campbell@yahoo.com> wrote in message
news:7285043.1080659657775.JavaMail.itn@is.intellij.net...

If IG is configured to show unused imports (and why does IG even care,

it's a native check in IDEA, no?), it will flag imports as unused that are
used only in any of the non-public classes in a file.
>

That is, if you have 2 classes defined, your public class and others, IG

will show imports as unused if they are needed only in the "other" classes.
>

Furthermore, using the intention to change the option warps you to the

IDEA version of the check, and not the IG one.


0
Comment actions Permalink


Got it. Thanks. A fix will be in the next release (date unknown).

--Dave Griffith

0
Comment actions Permalink

On 30-03-2004 17:14, Michael Campbell wrote:

If IG is configured to show unused imports (and why does IG even
care, it's a native check in IDEA, no?), it will flag imports as
unused that are used only in any of the non-public classes in a file.


That is, if you have 2 classes defined, your public class and others,
IG will show imports as unused if they are needed only in the "other"
classes.

Furthermore, using the intention to change the option warps you to
the IDEA version of the check, and not the IG one.


Another related issue in the Unused import inspection: an import is
flagged as unused even if an inner class of the import is used. Example:


Bas

0

Please sign in to leave a comment.