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.
This bug was originally marked as duplicate of bug 234923, that is already resolved. This bug is still valid, so this seems to be another bug, but it might be related. Build: NetBeans IDE 8.2 (Build 201609300101) VM: Java HotSpot(TM) 64-Bit Server VM, 25.144-b01, Java(TM) SE Runtime Environment, 1.8.0_144-b01 OS: Windows 10 User Comments: GUEST: Attempt to rename a package by right-clicking on the name in an import statement. Stacktrace: java.lang.IllegalArgumentException at org.netbeans.api.java.source.ElementUtilities.enclosingTypeElementImpl(ElementUtilities.java:160) at org.netbeans.api.java.source.ElementUtilities.enclosingTypeElement(ElementUtilities.java:154) at org.netbeans.modules.refactoring.java.plugins.RenameRefactoringPlugin$3.run(RenameRefactoringPlugin.java:454) at org.netbeans.modules.refactoring.java.plugins.RenameRefactoringPlugin$3.run(RenameRefactoringPlugin.java:436) at org.netbeans.api.java.source.JavaSource$MultiTask.run(JavaSource.java:486) at org.netbeans.modules.parsing.impl.TaskProcessor.callUserTask(TaskProcessor.java:609)
Created attachment 165226 [details] stacktrace