Bug 220779 - [rename] Renaming Method Can Lead to Shadowing of Statically Imported Method
Summary: [rename] Renaming Method Can Lead to Shadowing of Statically Imported Method
Status: NEW
Alias: None
Product: JDT
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 3.3.1   Edit
Hardware: PC Linux
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Markus Keller CLA
QA Contact:
URL:
Whiteboard: stalebug
Keywords:
Depends on:
Blocks:
 
Reported: 2008-02-28 11:52 EST by Max Schaefer CLA
Modified: 2022-12-20 04:54 EST (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Max Schaefer CLA 2008-02-28 11:52:52 EST
Build ID: M20071023-1652

Steps To Reproduce:
Test case:

    import static java.lang.String.*;

    public class A {
      static String m(int i) { return "42"; }
      public static void main(String[] args) {
        System.out.println(valueOf(23));
      }
    }

This prints 23. Renaming the method A.m to valueOf shadows the statically imported method String.valueOf, so the resulting program prints 42.

More information:
Comment 1 Martin Aeschlimann CLA 2008-02-29 06:27:12 EST
I guess we should address that...
Comment 2 Eclipse Genie CLA 2020-08-26 13:26:55 EDT
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.
Comment 3 Eclipse Genie CLA 2022-12-20 04:54:18 EST
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.