InspectionGadgets bug

Hi Dave,

As always, love the plugin and thanks for all your hard work. I don't
know if this falls into the bugfix category now that you've release 1.0
but I've got a false positive on 'Method overrides a static method of a
superclass' with the following code:

public class Test {
public static void method (int i) {

class Test2 extends Test {
public String method (String string) throws Exception {
return null;

As you can see, the signatures are pretty different, it looks like IG is
just looking at the name of the method and the number of arguments.

Thanks for all the inner-class bugfixes!

PS Another pet idiom of mine is code like the following - weren't you
talking at one point about having a checkbox for the inspection of
'Local variable hides member variable' so that where the local variable
is static it wouldn't get flagged?

public class Test {
private int myInteger;

public Test(int myInteger) {
this.myInteger = myInteger;

public static void main(String[] args) {
int myInteger = 1;
new Test(myInteger);

1 comment
Comment actions Permalink

One last little one (what's that proverb about bad things coming in
3s?): unnecessary import still doesn't seem to be working correctly with
static inner classes, e.g:

package com.mycompany.p1;

public class Outer {
public static class Inner {

package com.mycompany.p2;
import com.mycompany.p1.Outer; // Flagged as unused ...

public class Test {
public static void main(String[] argv) {
// Unnecessary FQN no longer flagged!
Outer.Inner i = new Outer.Inner();


Please sign in to leave a comment.