Community
Participate
Working Groups
Build Identifier: 20110615-0604 The refactor > move action on a method indicates visibility problems when moving a static method from one class to another, when that method references an enum literal from another package. The message reads: "The visibility of field 'xxx' will be changed to public." That's unnecessary, as enum literals are always public. This is a minor issue, as the warning can be safely ignored. With large refactorings, though, it might be a bit misleading. Reproducible: Always Steps to Reproduce: 1. Use the sample Eclipse project that I attached 2. Go to the "pkg1.Source" class 3. Click on the "method()" method 4. Right click, choose "Refactor", choose "Move" 5. Type Target1 6. Choose "Preview >" or "OK", the problem occurs with both buttons 7. The unnecessary warning occurs Note, this does not happen when in step 5, you choose pkg2.Target2, which is in the same package as the enum type itself.
Created attachment 208224 [details] Simple Eclipse project for reproduction
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.
I can no longer reproduce this myself...
(In reply to Lukas Eder from comment #3) > I can no longer reproduce this myself... thanks for re-testing.