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 43850

Summary: Encapsulate field doesn't generate setters correctly
Product: editor Reporter: psuk <psuk>
Component: RefactoringAssignee: issues@java <issues>
Status: CLOSED FIXED    
Severity: blocker Keywords: REGRESSION
Priority: P2    
Version: 4.x   
Hardware: PC   
OS: Windows ME/2000   
Issue Type: DEFECT Exception Reporter:

Description psuk 2004-05-25 19:31:42 UTC
Build 040525 metastavbicka, JDK 1.5

1. Invoke encapsulate field on myValue:

public class Gen {
    private String myValue;    
}

2. you'll get:
    public void setMyValue(java.lang.String myValue) {
        this.
    }

It's a regression, it used to work before
Comment 1 Tomas Hurka 2004-05-26 11:06:03 UTC
Right. It is regression. Fixed.
Checking in src/org/netbeans/api/refactoring/EncapsulateFieldRefactoring.java;
/cvs/refactoring/src/org/netbeans/api/refactoring/Attic/
EncapsulateFieldRefactoring.java,v  <--  EncapsulateFieldRefactoring.java
new revision: 1.1.2.13.2.3; previous revision: 1.1.2.13.2.2
done
Comment 2 Jiri Prox 2005-07-18 16:29:57 UTC
verified in dev-050718