Details
-
Bug
-
Status: Open
-
Major
-
Resolution: Unresolved
-
12.1, 12.2, 12.3, 12.4
-
None
-
None
-
Windows 10
JDK 15
Description
In all versions of NB > 12.0, I regularly experience problems / exceptions when trying to refactor classes. In some cases, when moving a class to a new package, NB will scramble the import statements contained in classes that depend on the moved class. In other cases, when trying to rename a class, NB will rename the file, but fail to rename the class. And in other cases, when trying to move a class to a new package, NB will generate an exception:
----- Classpath: -------------------------------------------------- Classpath: --------------------------------------------bootPath: nbjrt:file:/C:/Program%20Files/AdoptOpenJDK/jdk-15.0.2.7-hotspot/!/modules/java.base/;nbjrt:file:/C:/Program%20Files/AdoptOpenJDK/jdk-15.0.2.7-hotspot/!/modules/java.compiler/;nbjrt:file:/C:/Program%20Files/AdoptOpenJDK/jdk-15.0.2.7-hotspot/!/modules/java.datatransfer/;nbjrt:file:/C:/Program%20Files/AdoptOpenJDK/jdk-15.0.2.7-hotspot/!/modules/java.desktop/;nbjrt:file:/C:/Program%20Files/AdoptOpenJDK/jdk-15.0.2.7-hotspot/!/modules/java.management/;nbjrt:file:/C:/Program%20Files/AdoptOpenJDK/jdk-15.0.2.7-hotspot/!/modules/java.naming/;nbjrt:file:/C:/Program%20Files/AdoptOpenJDK/jdk-15.0.2.7-hotspot/!/modules/java.prefs/;nbjrt:file:/C:/Program%20Files/AdoptOpenJDK/jdk-15.0.2.7-hotspot/!/modules/java.security.jgss/;nbjrt:file:/C:/Program%20Files/AdoptOpenJDK/jdk-15.0.2.7-hotspot/!/modules/java.xml/;nbjrt:file:/C:/Program%20Files/AdoptOpenJDK/jdk-15.0.2.7-hotspot/!/modules/jdk.accessibility/;nbjrt:file:/C:/Program%20Files/AdoptOpenJDK/jdk-15.0.2.7-hotspot/!/modules/jdk.attach/;nbjrt:file:/C:/Program%20Files/AdoptOpenJDK/jdk-15.0.2.7-hotspot/!/modules/jdk.compiler/;nbjrt:file:/C:/Program%20Files/AdoptOpenJDK/jdk-15.0.2.7-hotspot/!/modules/jdk.dynalink/;nbjrt:file:/C:/Program%20Files/AdoptOpenJDK/jdk-15.0.2.7-hotspot/!/modules/jdk.httpserver/;nbjrt:file:/C:/Program%20Files/AdoptOpenJDK/jdk-15.0.2.7-hotspot/!/modules/jdk.jartool/;nbjrt:file:/C:/Program%20Files/AdoptOpenJDK/jdk-15.0.2.7-hotspot/!/modules/jdk.javadoc/;nbjrt:file:/C:/Program%20Files/AdoptOpenJDK/jdk-15.0.2.7-hotspot/!/modules/jdk.jconsole/;nbjrt:file:/C:/Program%20Files/AdoptOpenJDK/jdk-15.0.2.7-hotspot/!/modules/jdk.jdi/;nbjrt:file:/C:/Program%20Files/AdoptOpenJDK/jdk-15.0.2.7-hotspot/!/modules/jdk.jfr/;nbjrt:file:/C:/Program%20Files/AdoptOpenJDK/jdk-15.0.2.7-hotspot/!/modules/jdk.jshell/;nbjrt:file:/C:/Program%20Files/AdoptOpenJDK/jdk-15.0.2.7-hotspot/!/modules/jdk.jsobject/;nbjrt:file:/C:/Program%20Files/AdoptOpenJDK/jdk-15.0.2.7-hotspot/!/modules/jdk.management/;nbjrt:file:/C:/Program%20Files/AdoptOpenJDK/jdk-15.0.2.7-hotspot/!/modules/jdk.management.jfr/;nbjrt:file:/C:/Program%20Files/AdoptOpenJDK/jdk-15.0.2.7-hotspot/!/modules/jdk.net/;nbjrt:file:/C:/Program%20Files/AdoptOpenJDK/jdk-15.0.2.7-hotspot/!/modules/jdk.nio.mapmode/;nbjrt:file:/C:/Program%20Files/AdoptOpenJDK/jdk-15.0.2.7-hotspot/!/modules/jdk.sctp/;nbjrt:file:/C:/Program%20Files/AdoptOpenJDK/jdk-15.0.2.7-hotspot/!/modules/jdk.security.auth/;nbjrt:file:/C:/Program%20Files/AdoptOpenJDK/jdk-15.0.2.7-hotspot/!/modules/jdk.security.jgss/;nbjrt:file:/C:/Program%20Files/AdoptOpenJDK/jdk-15.0.2.7-hotspot/!/modules/jdk.unsupported/;nbjrt:file:/C:/Program%20Files/AdoptOpenJDK/jdk-15.0.2.7-hotspot/!/modules/jdk.unsupported.desktop/;nbjrt:file:/C:/Program%20Files/AdoptOpenJDK/jdk-15.0.2.7-hotspot/!/modules/jdk.xml.dom/classPath: D:\Repositories\iGradePlus\WebApp.R5\iGradePlusLib\dist\iGradePlusLib.jar;D:\Repositories\iGradePlus\WebApp.R5\iGradePlusDaoLib\dist\iGradePlusDaoLib.jar;D:\Repositories\iGradePlus\WebApp.R5\iGradePlusRestLib\dist\iGradePlusRestLib.jar;D:\Repositories\iGradePlus\WebApp.R5\iGradePlusLib\libs\Oorian.jar;D:\Repositories\iGradePlus\WebApp.R5\iGradePlusLib\libs\OorianControlsLib.jar;D:\Repositories\iGradePlus\WebApp.R5\iGradePlusLib\libs\iGradePlusLibs.jar;D:\Repositories\iGradePlus\WebApp.R5\iGradePlusLib\libs\Spire.Doc.jar;E:\apache-tomcat-9.0.43\lib\annotations-api.jar;E:\apache-tomcat-9.0.43\lib\catalina-ant.jar;E:\apache-tomcat-9.0.43\lib\catalina-ha.jar;E:\apache-tomcat-9.0.43\lib\catalina-ssi.jar;E:\apache-tomcat-9.0.43\lib\catalina-storeconfig.jar;E:\apache-tomcat-9.0.43\lib\catalina-tribes.jar;E:\apache-tomcat-9.0.43\lib\catalina.jar;E:\apache-tomcat-9.0.43\lib\ecj-4.18.jar;E:\apache-tomcat-9.0.43\lib\el-api.jar;E:\apache-tomcat-9.0.43\lib\jasper-el.jar;E:\apache-tomcat-9.0.43\lib\jasper.jar;E:\apache-tomcat-9.0.43\lib\jaspic-api.jar;E:\apache-tomcat-9.0.43\lib\jsp-api.jar;E:\apache-tomcat-9.0.43\lib\servlet-api.jar;E:\apache-tomcat-9.0.43\lib\tomcat-api.jar;E:\apache-tomcat-9.0.43\lib\tomcat-coyote.jar;E:\apache-tomcat-9.0.43\lib\tomcat-dbcp.jar;E:\apache-tomcat-9.0.43\lib\tomcat-i18n-cs.jar;E:\apache-tomcat-9.0.43\lib\tomcat-i18n-de.jar;E:\apache-tomcat-9.0.43\lib\tomcat-i18n-es.jar;E:\apache-tomcat-9.0.43\lib\tomcat-i18n-fr.jar;E:\apache-tomcat-9.0.43\lib\tomcat-i18n-ja.jar;E:\apache-tomcat-9.0.43\lib\tomcat-i18n-ko.jar;E:\apache-tomcat-9.0.43\lib\tomcat-i18n-pt-BR.jar;E:\apache-tomcat-9.0.43\lib\tomcat-i18n-ru.jar;E:\apache-tomcat-9.0.43\lib\tomcat-i18n-zh-CN.jar;E:\apache-tomcat-9.0.43\lib\tomcat-jdbc.jar;E:\apache-tomcat-9.0.43\lib\tomcat-jni.jar;E:\apache-tomcat-9.0.43\lib\tomcat-util-scan.jar;E:\apache-tomcat-9.0.43\lib\tomcat-util.jar;E:\apache-tomcat-9.0.43\lib\tomcat-websocket.jar;E:\apache-tomcat-9.0.43\lib\websocket-api.jar;D:\Repositories\iGradePlus\WebApp.R5\iGradePlusApp\build\web\WEB-INF\classes;D:\Repositories\iGradePlus\WebApp.R5\iGradePlusLib\dist\iGradePlusLib.jar;D:\Repositories\iGradePlus\WebApp.R5\iGradePlusDaoLib\dist\iGradePlusDaoLib.jar;D:\Repositories\iGradePlus\WebApp.R5\iGradePlusRestLib\dist\iGradePlusRestLib.jar;D:\Repositories\iGradePlus\WebApp.R5\iGradePlusLib\libs\Oorian.jar;D:\Repositories\iGradePlus\WebApp.R5\iGradePlusLib\libs\OorianControlsLib.jar;D:\Repositories\iGradePlus\WebApp.R5\iGradePlusLib\libs\iGradePlusLibs.jar;D:\Repositories\iGradePlus\WebApp.R5\iGradePlusLib\libs\Spire.Doc.jar;E:\apache-tomcat-9.0.43\lib\annotations-api.jar;E:\apache-tomcat-9.0.43\lib\catalina-ant.jar;E:\apache-tomcat-9.0.43\lib\catalina-ha.jar;E:\apache-tomcat-9.0.43\lib\catalina-ssi.jar;E:\apache-tomcat-9.0.43\lib\catalina-storeconfig.jar;E:\apache-tomcat-9.0.43\lib\catalina-tribes.jar;E:\apache-tomcat-9.0.43\lib\catalina.jar;E:\apache-tomcat-9.0.43\lib\ecj-4.18.jar;E:\apache-tomcat-9.0.43\lib\el-api.jar;E:\apache-tomcat-9.0.43\lib\jasper-el.jar;E:\apache-tomcat-9.0.43\lib\jasper.jar;E:\apache-tomcat-9.0.43\lib\jaspic-api.jar;E:\apache-tomcat-9.0.43\lib\jsp-api.jar;E:\apache-tomcat-9.0.43\lib\servlet-api.jar;E:\apache-tomcat-9.0.43\lib\tomcat-api.jar;E:\apache-tomcat-9.0.43\lib\tomcat-coyote.jar;E:\apache-tomcat-9.0.43\lib\tomcat-dbcp.jar;E:\apache-tomcat-9.0.43\lib\tomcat-i18n-cs.jar;E:\apache-tomcat-9.0.43\lib\tomcat-i18n-de.jar;E:\apache-tomcat-9.0.43\lib\tomcat-i18n-es.jar;E:\apache-tomcat-9.0.43\lib\tomcat-i18n-fr.jar;E:\apache-tomcat-9.0.43\lib\tomcat-i18n-ja.jar;E:\apache-tomcat-9.0.43\lib\tomcat-i18n-ko.jar;E:\apache-tomcat-9.0.43\lib\tomcat-i18n-pt-BR.jar;E:\apache-tomcat-9.0.43\lib\tomcat-i18n-ru.jar;E:\apache-tomcat-9.0.43\lib\tomcat-i18n-zh-CN.jar;E:\apache-tomcat-9.0.43\lib\tomcat-jdbc.jar;E:\apache-tomcat-9.0.43\lib\tomcat-jni.jar;E:\apache-tomcat-9.0.43\lib\tomcat-util-scan.jar;E:\apache-tomcat-9.0.43\lib\tomcat-util.jar;E:\apache-tomcat-9.0.43\lib\tomcat-websocket.jar;E:\apache-tomcat-9.0.43\lib\websocket-api.jarsourcePath: D:\Repositories\iGradePlus\WebApp.R5\iGradePlusApp\src---- Original exception ---------------------------------------------java.lang.NullPointerException: Cannot invoke "java.util.Collection.contains(Object)" because "sourceFiles" is null at com.sun.tools.javac.comp.Todo.retainFiles(Todo.java:98) at org.netbeans.modules.java.source.parsing.JavacParser.moveToPhase(JavacParser.java:727) at org.netbeans.modules.java.source.parsing.CompilationInfoImpl.toPhase(CompilationInfoImpl.java:399) at org.netbeans.api.java.source.CompilationController.toPhase(CompilationController.java:88) at org.netbeans.api.java.source.WorkingCopy.toPhase(WorkingCopy.java:193) at org.netbeans.modules.refactoring.java.spi.RefactoringVisitor.setWorkingCopy(RefactoringVisitor.java:111) at org.netbeans.modules.refactoring.java.plugins.MoveTransformer.setWorkingCopy(MoveTransformer.java:74) at org.netbeans.modules.refactoring.java.spi.JavaRefactoringPlugin$TransformTask.run(JavaRefactoringPlugin.java:435) at org.netbeans.modules.refactoring.java.spi.JavaRefactoringPlugin$TransformTask.run(JavaRefactoringPlugin.java:418) at org.netbeans.modules.refactoring.java.spi.JavaRefactoringPlugin.lambda$processFiles$0(JavaRefactoringPlugin.java:323) at org.netbeans.api.java.source.JavaSource$1.run(JavaSource.java:673) at org.netbeans.api.java.source.JavaSource$1.run(JavaSource.java:663) at org.netbeans.api.java.source.JavaSource$MultiTask.run(JavaSource.java:502) at org.netbeans.modules.parsing.impl.TaskProcessor.callUserTask(TaskProcessor.java:586) at org.netbeans.modules.parsing.api.ParserManager$MultiUserTaskAction.run(ParserManager.java:166) at org.netbeans.modules.parsing.api.ParserManager$MultiUserTaskAction.run(ParserManager.java:138) at org.netbeans.modules.parsing.impl.TaskProcessor$2.call(TaskProcessor.java:181) at org.netbeans.modules.parsing.impl.TaskProcessor$2.call(TaskProcessor.java:178) at org.netbeans.modules.masterfs.filebasedfs.utils.FileChangedManager.priorityIO(FileChangedManager.java:153) at org.netbeans.modules.masterfs.providers.ProvidedExtensions.priorityIO(ProvidedExtensions.java:335) at org.netbeans.modules.parsing.nb.DataObjectEnvFactory.runPriorityIO(DataObjectEnvFactory.java:118) at org.netbeans.modules.parsing.impl.Utilities.runPriorityIO(Utilities.java:67) at org.netbeans.modules.parsing.impl.TaskProcessor.runUserTask(TaskProcessor.java:178) at org.netbeans.modules.parsing.api.ParserManager.parse(ParserManager.java:83) at org.netbeans.api.java.source.JavaSource.runUserActionTaskImpl(JavaSource.java:452) at org.netbeans.api.java.source.JavaSource.runUserActionTask(JavaSource.java:423) at org.netbeans.api.java.source.JavaSource.runModificationTask(JavaSource.java:684) at org.netbeans.modules.refactoring.java.spi.JavaRefactoringPlugin.processFiles(JavaRefactoringPlugin.java:321) at org.netbeans.modules.refactoring.java.spi.JavaRefactoringPlugin.processFiles(JavaRefactoringPlugin.java:264) at org.netbeans.modules.refactoring.java.spi.JavaRefactoringPlugin.processFiles(JavaRefactoringPlugin.java:246) at org.netbeans.modules.refactoring.java.spi.JavaRefactoringPlugin.createAndAddElements(JavaRefactoringPlugin.java:336) at org.netbeans.modules.refactoring.java.spi.JavaRefactoringPlugin.createAndAddElements(JavaRefactoringPlugin.java:352) at org.netbeans.modules.refactoring.java.plugins.MoveFileRefactoringPlugin.prepare(MoveFileRefactoringPlugin.java:571) at org.netbeans.modules.refactoring.api.AbstractRefactoring.pluginsPrepare2(AbstractRefactoring.java:417) at org.netbeans.modules.refactoring.api.AbstractRefactoring.pluginsPrepare(AbstractRefactoring.java:401) at org.netbeans.modules.refactoring.api.AbstractRefactoring.prepare(AbstractRefactoring.java:212) at org.netbeans.modules.refactoring.spi.impl.ParametersPanel$Prepare.run(ParametersPanel.java:1063) at org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:1418) at org.netbeans.modules.openide.util.GlobalLookup.execute(GlobalLookup.java:45) at org.openide.util.lookup.Lookups.executeWith(Lookups.java:278) at org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:2033)