IDEA thinks that the al parameter is used somehow in new al()
(Test.f() method). As a result "import foo2.*;" is marked as
redundant (this is wrong). If you rename the parameter to "a"
(now it's correct, "Parameter a is never used").
If you comment out "import foo2.*" nothings is marked (wrong).
If you now rename the parameter to "a", IDEA will say as expected
"Cannot resolve symbol al" and "Parameter a is never used".


Timur Zambalayev


===============================================
// foo1/Test.java
package foo1;

import java.util.ArrayList;
import foo2.*;

public class Test {
    private static void f(ArrayList al) {
        System.out.println("val="+new al());
    }
    public static void main(String[] args) {
        f(new ArrayList());
    }
}
===============================================
// foo2/al.java
package foo2;

public class al {
    public String toString() {
        return "foo2.al";
    }
}
===============================================


_______________________________________________
Eap-list mailing list
[EMAIL PROTECTED]
http://www.intellij.com/mailman/listinfo/eap-list

Reply via email to