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 136203 - NPE attempting to encapsulate field that's already encapsulated
Summary: NPE attempting to encapsulate field that's already encapsulated
Status: RESOLVED DUPLICATE of bug 131619
Alias: None
Product: java
Classification: Unclassified
Component: Refactoring (show other bugs)
Version: 6.x
Hardware: All Windows XP
: P3 blocker (vote)
Assignee: issues@java
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-05-30 23:56 UTC by vaughn
Modified: 2008-06-02 08:53 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
messages.log showing NPE with multiple encapsulate bug (77.92 KB, text/plain)
2008-05-30 23:59 UTC, vaughn
Details

Note You need to log in before you can comment on or make changes to this bug.
Description vaughn 2008-05-30 23:56:23 UTC
Selected 3 fields and tried Refactor > Encapsulate Fields. One of the selected fields was previously encapsulated. IDE
threw java.lang.NullPointerException. Here's the source that caused the problem.

public class ServletController {

    private final UriFromClient uriFromClient;
    private final ClientCommunicator clientCommunicator;
    private final UriParser uriParser;

    public UriFromClient getUriFromClient() {
        return uriFromClient;
    }

    public ServletController(UriFromClient ufm, ClientCommunicator cc, UriParser up) {
        this.uriFromClient = ufm;
        this.clientCommunicator = cc;
        this.uriParser = up;
    }
}
Comment 1 vaughn 2008-05-30 23:59:04 UTC
Created attachment 62197 [details]
messages.log showing NPE with multiple encapsulate bug
Comment 2 Jiri Prox 2008-06-02 08:53:06 UTC
This issue is already fixed and the fix will be included in patch 2. Thanks for your report anyway.

*** This issue has been marked as a duplicate of 131619 ***