Community
Participate
Working Groups
Build Identifier: I20110613-1736 I have two enums with similarly named fields: enum Horizontal {TOP, CENTER, BOTTOM} enum Vertical {LEFT, CENTER, RIGHT} I have code that uses them like this: import Horizontal.TOP; import Vertical.CENTER; // in some method setAlignment(TOP, CENTER); I have the organize imports action configured to replace static imports with .* whenever there's 1 or more. (Window menu -> Preferences -> Java -> Code Style -> Organize Imports -> Number of static imports needed for .* = 1) Now, organizing imports will change the imports to: import Horizontal.*; import Vertical.*; Since Horizontal also offers a CENTER constant, my method call no longer compiles, since it expects an instance of Horizontal and one of Vertical, and it now gets two of Horizontal. Reproducible: Always Steps to Reproduce: 1. Organize imports in code and settings as described above
Java tooling bugs go to JDT.
Thanks for moving this to the correct product, but is someone going to take a look at it?
I confirm that this is a bug which needs to be fixed. However, we may not be able to look at this right now. Please feel free to contribute a patch.
Fixed via bug 430303.
Verified for 4.5 M6 with build I20150316-2000