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 268217

Summary: NullPointerException at org.netbeans.api.java.source.ElementUtilities.enclosingTypeElementImpl
Product: java Reporter: jdlee <jdlee>
Component: RefactoringAssignee: Svata Dedic <sdedic>
Status: NEW ---    
Severity: normal CC: choces, gtzabari, java1cprog
Priority: P3    
Version: Dev   
Hardware: All   
OS: All   
Issue Type: DEFECT Exception Reporter: 226435
Attachments: stacktrace
stacktrace
stacktrace

Description jdlee 2016-09-27 04:58:24 UTC
Build: NetBeans IDE Dev JDK9 Branch (Build 201609260404)
VM: Java HotSpot(TM) 64-Bit Server VM, 25.102-b14, Java(TM) SE Runtime Environment, 1.8.0_102-b14
OS: Windows 10

User Comments:
jdlee: Moving a class from one package to another




Stacktrace: 
java.lang.NullPointerException
   at org.netbeans.api.java.source.ElementUtilities.enclosingTypeElementImpl(ElementUtilities.java:165)
   at org.netbeans.api.java.source.ElementUtilities.enclosingTypeElement(ElementUtilities.java:154)
   at org.netbeans.modules.refactoring.java.plugins.MoveTransformer.visitMemberSelect(MoveTransformer.java:151)
   at org.netbeans.modules.refactoring.java.plugins.MoveTransformer.visitMemberSelect(MoveTransformer.java:72)
   at com.sun.tools.javac.tree.JCTree$JCFieldAccess.accept(JCTree.java:2104)
   at com.sun.source.util.TreePathScanner.scan(TreePathScanner.java:71)
Comment 1 jdlee 2016-09-27 04:58:26 UTC
Created attachment 162227 [details]
stacktrace
Comment 2 Exceptions Reporter 2017-12-12 14:57:08 UTC
This bug already has 5 duplicates 
see http://statistics.netbeans.org/exceptions/detail.do?id=226435
Comment 3 Exceptions Reporter 2017-12-30 17:06:29 UTC
Created attachment 165603 [details]
stacktrace

trying to move classes from a package in a module to another module (and package in that 2nd module).
Comment 4 choces 2018-03-25 19:26:46 UTC
Created attachment 165687 [details]
stacktrace

while renaming a package