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 214813 - NullPointerException at org.netbeans.modules.refactoring.java.RefactoringUtils.findEnclosingClass
Summary: NullPointerException at org.netbeans.modules.refactoring.java.RefactoringUtil...
Status: RESOLVED WORKSFORME
Alias: None
Product: java
Classification: Unclassified
Component: Refactoring (show other bugs)
Version: 7.2
Hardware: All All
: P3 normal (vote)
Assignee: Ralph Ruijs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-06-26 16:17 UTC by _mikejwatts_
Modified: 2015-02-04 03:29 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter: 190107


Attachments
stacktrace (11.02 KB, text/plain)
2012-06-26 16:17 UTC, _mikejwatts_
Details
stacktrace (10.27 KB, text/plain)
2013-03-15 14:39 UTC, Jiri Prox
Details

Note You need to log in before you can comment on or make changes to this bug.
Description _mikejwatts_ 2012-06-26 16:17:38 UTC
Build: NetBeans IDE 7.2 Beta (Build 201205031832)
VM: Java HotSpot(TM) Client VM, 21.0-b17, Java(TM) SE Runtime Environment, 1.7.0-b147
OS: Windows XP

User Comments:
_mikejwatts_: moving enum to superclass




Stacktrace: 
java.lang.NullPointerException
   at org.netbeans.modules.refactoring.java.RefactoringUtils.findEnclosingClass(RefactoringUtils.java:779)
   at org.netbeans.modules.refactoring.java.api.JavaRefactoringUtils.findEnclosingClass(JavaRefactoringUtils.java:145)
   at org.netbeans.modules.refactoring.java.plugins.MoveMembersRefactoringPlugin.fastCheckParameters(MoveMembersRefactoringPlugin.java:239)
   at org.netbeans.modules.refactoring.java.spi.JavaRefactoringPlugin$WorkingTask.run(JavaRefactoringPlugin.java:359)
   at org.netbeans.modules.refactoring.java.spi.JavaRefactoringPlugin$WorkingTask.run(JavaRefactoringPlugin.java:329)
   at org.netbeans.api.java.source.JavaSource$MultiTask.run(JavaSource.java:488)
Comment 1 _mikejwatts_ 2012-06-26 16:17:42 UTC
Created attachment 121398 [details]
stacktrace
Comment 2 Jiri Prox 2013-03-15 14:39:43 UTC
Created attachment 132658 [details]
stacktrace

NPE when trying to move methods from enum

Steps to reproduce:
1) have a enum MyEnum {A,B;}
2) call Move refactoring
3) in opened dialog select valueOf method
Comment 3 Quality Engineering 2015-02-04 03:29:25 UTC
Reported for 7.3.x or earlier, no new info since then -> closing as worksforme, please reopen in case you see it.