Bug 277174 - getter setter] Generate Getters and Setters thinks a static method is a getter
Summary: getter setter] Generate Getters and Setters thinks a static method is a getter
Status: RESOLVED DUPLICATE of bug 18757
Alias: None
Product: JDT
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 3.4.2   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: JDT-UI-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-05-20 13:25 EDT by Daniel CLA
Modified: 2009-05-21 02:18 EDT (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 Daniel CLA 2009-05-20 13:25:17 EDT
Build ID: M20090211-1700

Steps To Reproduce:
See the sample code below.

Paste that code into Eclipse, right click and choose "Source -> Generate Getters and Setters...".  The wizard does not list a getter for AA.  It should -- the static method is NOT an instance-level getter.


Sample code:

public class test {
    private int AA;
    
    public static int getAA() {
        return 1;
    }
}
Comment 1 Daniel CLA 2009-05-20 13:28:33 EDT
I realize that it's illegal to have both a static and instance-level method with the same name, but it would be nice if the wizard would flag a case similar to my example with a warning.
Comment 2 Dani Megert CLA 2009-05-21 02:18:30 EDT
What you see is not related to whether the existing method is static or not.

*** This bug has been marked as a duplicate of bug 18757 ***