Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 214675 - [getter setter] When it generates getters for collections, return unmodifiable
Summary: [getter setter] When it generates getters for collections, return unmodifiable
Status: RESOLVED DUPLICATE of bug 85784
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Text (show other bugs)
Version: 3.3   Edit
Hardware: PC Windows XP
: P3 enhancement (vote)
Target Milestone: ---   Edit
Assignee: JDT-Text-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-01-08 16:15 EST by Carl Manaster CLA
Modified: 2008-01-09 02:14 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 Carl Manaster CLA 2008-01-08 16:15:12 EST
Build ID: M20070921-1145

Steps To Reproduce:
1.public class Foo {
	List<Bar> bars = new ArrayList<Bar>();
}
2. Source > Generate Getters and Setters...
3. Gives:
return bars;

instead of 
return Collections.unmodifiableList(bars);


More information:
This is a feature request, not a bug, but I don't know how to specify that.  I think this feature would promote a better programming practice.

I don't know what "APT" is, but none of the other Component options seemed appropriate.
Comment 1 Walter Harley CLA 2008-01-08 16:31:07 EST
Reassigning component to 'TEXT' and severity to 'Enhancement'.
Comment 2 Dani Megert CLA 2008-01-09 02:14:11 EST

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