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 242219 - NullPointerException at org.netbeans.modules.refactoring.java.ui.EncapsulateFieldUI.create
Summary: NullPointerException at org.netbeans.modules.refactoring.java.ui.EncapsulateF...
Status: RESOLVED FIXED
Alias: None
Product: java
Classification: Unclassified
Component: Refactoring (show other bugs)
Version: 7.3
Hardware: All All
: P3 normal (vote)
Assignee: Ralph Ruijs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-02-22 12:07 UTC by nhamhs
Modified: 2014-07-30 02:33 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter: 197219


Attachments
stacktrace (5.09 KB, text/plain)
2014-02-22 12:08 UTC, nhamhs
Details

Note You need to log in before you can comment on or make changes to this bug.
Description nhamhs 2014-02-22 12:07:57 UTC
Build: NetBeans IDE 7.3 (Build 201306052037)
VM: Java HotSpot(TM) 64-Bit Server VM, 24.45-b08, Java(TM) SE Runtime Environment, 1.7.0_45-b18
OS: Windows 8

User Comments:
GUEST: Encapsulate Filed while selected a bunch of random code

GUEST: Gives the exception when trying to create Getters and Setters.
On click of Encapsulate fields.
Netbeans running on Linux Mint 13.

GUEST: Trying to encapsulate fields from inner class:


class ScenarioPoint {

        Instant time;
        ISpeed speed;
        IAzimuth direction;
    }

GUEST: Unable to refactor setter and getter

GUEST: I tried to encapsulate the fields and the exception happened.

GUEST: Tried to encapsulate fields

GUEST: i was creating a class i wrote some fields, and before create a constructor, i selected some Strings and i pressed right clic on them then i chose the option refactor and Encapsulate fields.

nhamhs: Refactor not working.

GUEST: I wasn't doing anything.  I just opened the project and there it was!




Stacktrace: 
java.lang.NullPointerException
   at org.netbeans.modules.refactoring.java.ui.EncapsulateFieldUI.create(EncapsulateFieldUI.java:242)
   at org.netbeans.modules.refactoring.java.ui.ContextAnalyzer$1.createRefactoringUI(ContextAnalyzer.java:117)
   at org.netbeans.modules.refactoring.java.ui.ContextAnalyzer$TextComponentTask.run(ContextAnalyzer.java:376)
   at org.netbeans.modules.refactoring.java.ui.ContextAnalyzer$TextComponentTask.run(ContextAnalyzer.java:301)
   at org.netbeans.api.java.source.JavaSource$MultiTask.run(JavaSource.java:488)
   at org.netbeans.modules.parsing.impl.TaskProcessor.callUserTask(TaskProcessor.java:584)
Comment 1 nhamhs 2014-02-22 12:08:00 UTC
Created attachment 145489 [details]
stacktrace
Comment 2 Ralph Ruijs 2014-07-18 12:55:12 UTC
changeset:   581681b0bc95
user:        Ralph Benjamin Ruijs <ralphbenjamin@netbeans.org>
date:        Fri Jul 18 14:33:35 2014 +0200
summary:     #242219 - NullPointerException at org.netbeans.modules.refactoring.java.ui.EncapsulateFieldUI.create
Comment 3 Quality Engineering 2014-07-30 02:33:33 UTC
Integrated into 'main-silver', will be available in build *201407300001* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)

Changeset: http://hg.netbeans.org/main-silver/rev/581681b0bc95
User: Ralph Benjamin Ruijs <ralphbenjamin@netbeans.org>
Log: #242219 - NullPointerException at org.netbeans.modules.refactoring.java.ui.EncapsulateFieldUI.create