This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 202290

Summary: [71cat] optimized encapsulate fields
Product: java Reporter: muellermi <muellermi>
Component: RefactoringAssignee: Jan Becicka <jbecicka>
Status: RESOLVED WONTFIX    
Severity: normal    
Priority: P3    
Version: 7.1   
Hardware: PC   
OS: Windows XP   
Issue Type: ENHANCEMENT Exception Reporter:

Description muellermi 2011-09-19 09:09:19 UTC
Product Version = NetBeans IDE Dev (Build 201109180600)
Operating System = Windows XP version 5.1 running on x86
Java; VM; Vendor = 1.7.0
Runtime = Java HotSpot(TM) Client VM 21.0-b17

let's assume there is an attribute like this
private boolean _isComplete;

encapsulate field will generate an ugly pair for getter/setter
    public boolean isIsComplete() {
    public void setIsComplete(boolean isComplete) {

--> if an attribute starts with "_is" or "is" don't keep this / don't double "is"
suggested generated getter/setter
    public boolean isComplete() {
    public void setComplete(boolean isComplete) {
Comment 1 Ralph Ruijs 2011-09-20 11:37:41 UTC
I think the current behavior is correct. The spec states:
get<PropertyName>()
or as an alternative for booleans
is<PropertyName>()

Marking as wontfix.