Community
Participate
Working Groups
Created attachment 256618 [details] project With the following code: C.java------ package b; public enum C { d, e } ------------ B.java------ package b; import java.lang.annotation.ElementType; import java.lang.annotation.Target; @Target(ElementType.FIELD) public @interface B { C value(); } ------------ A.java------ package a; import static a.A.Inner.ONE; import b.B; import b.C; public final class A { public static class Inner { @B(C.d) public static final int ONE = 1; } public static int foo() { return ONE; } } ------------ There is a warning ("The import x is never used") on the imports for b.B and b.C. These warnings are incorrect since if those imports are removed the compilation fails since both B and C are used in the inner class (A.Inner). Note that replacing "import static a.A.Inner.ONE" with "import static a.A.Inner.*" makes the warnings go away. A zipped project containing the same files is attached. I initially thought that this might be the same as bug 414423, however I could not reproduce bug 414423.
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet. As such, we're closing this bug. If you have further information on the current state of the bug, please add it and reopen this bug. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant. -- The automated Eclipse Genie.
This has been fixed in 4.10, most likely via bug 534865 *** This bug has been marked as a duplicate of bug 534865 ***