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 - NullPointerException at org.netbeans.api.java.source.ElementUtilities.enclosingTypeElementImpl
Summary: NullPointerException at org.netbeans.api.java.source.ElementUtilities.enclosi...
Status: NEW
Alias: None
Product: java
Classification: Unclassified
Component: Refactoring (show other bugs)
Version: Dev
Hardware: All All
: P3 normal (vote)
Assignee: Svata Dedic
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-09-27 04:58 UTC by jdlee
Modified: 2018-03-25 19:26 UTC (History)
3 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter: 226435


Attachments
stacktrace (5.64 KB, text/plain)
2016-09-27 04:58 UTC, jdlee
Details
stacktrace (5.57 KB, text/plain)
2017-12-30 17:06 UTC, Exceptions Reporter
Details
stacktrace (5.57 KB, text/plain)
2018-03-25 19:26 UTC, choces
Details

Note You need to log in before you can comment on or make changes to this bug.
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