Bug 43569 - generate setter should declare parameter final
Summary: generate setter should declare parameter final
Status: RESOLVED DUPLICATE of bug 40078
Alias: None
Product: JDT
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 3.0   Edit
Hardware: PC Windows 2000
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: JDT-UI-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-09-24 10:17 EDT by Nikolay Metchev CLA
Modified: 2003-09-24 13:03 EDT (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Nikolay Metchev CLA 2003-09-24 10:17:08 EDT
When you generate a setter for a field the parameter to the setter should be 
final e.g:

----------------
public class A
{
   int m_field; //<-- generate getter for m_field
}
------------------
result should be:
--------------------
public class A
{
   int m_field; //<-- generate getter for m_field
   
   public void setField(final int field)
   {
      m_field = field;
   }
}
Comment 1 Dani Megert CLA 2003-09-24 11:32:48 EDT
I'd rather say this is a personal preference. Some people always use final when
declaring method parameters and others don't.
Comment 2 Nikolay Metchev CLA 2003-09-24 11:43:17 EDT
The best place for that preference would be in the dialog that pops up when you 
select generate getter and setter!
Comment 3 Dirk Baeumer CLA 2003-09-24 13:03:21 EDT

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