Community
Participate
Working Groups
For the following class package a; interface Foo { static void x() { } class Bar implements Foo { static void y() { x(); } } } "organize imports" automatically adds "import static a.Foo.x;". And then the compiler complains that this import is never used.
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. If you have further information on the current state of the bug, please add it. 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.
The problem still occurs (Eclipse 2018-12)
Vikas, this looks like a good candidate for you. Can you take a look at this?
>>Can you take a look at this? I will have a look.
… and if x() is declared as private in the example, as in interface Foo { private static void x() { } … } then the compiler complains that the import cannot be resolved.
New Gerrit change created: https://git.eclipse.org/r/141951
New Gerrit change created: https://git.eclipse.org/r/141960
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.
The useless import is still generated.