Hello Martin,
Thanks for the confirmation. Here too, sometimes the refactor-renaming works,
but mostly it doesn't. And I too assumed it was "just" some problem specific
to my configuration...
Have you tried Thomas' excellent work-around for the problem? He wrote:
You need to uninstall the nb-javac library, then refactoring works again.
I still get it with 11.3-beta3 as long as nb-javac is installed
Note that just disabling nb-javac is not enough.
Adieu,
Hans
Am 17.02.20 um 12:16 schrieb Martin Desruisseaux:
Hello Hans
Le 17/02/2020 à 11:41, Hans Grimmselshausen a écrit :
With Netbeans 11.2 (but also with 11.0) running in OpenJDK 11.0.6 on
Ubuntu 18 LTS, for some time I experience a lot of problems when I try to
refactor-rename public variables and functions in my mid-sized project.
Mostly but not always, I then get the following error:
Module Java Refactoring threw java.util.ConcurrentModificationException.
(…snip…)
Refactoring in an Ant project is also broken for me since NetBeans 11.2
running on OpenJDK 13.0.1. Or actually it works only if the class is not
yet used by any other class. The "Search usage" action seems to suffer from
the same problem. I assumed it was some problem specific to my
configuration so I didn't took the time to investigate yet. It my case, the
exception I got is an AssertionError:
Caused: java.lang.AssertionError
at com.sun.tools.javac.util.Assert.error(Assert.java:155)
at com.sun.tools.javac.util.Assert.checkNonNull(Assert.java:62)
at
com.sun.tools.javac.comp.Modules.setCompilationUnitModules(Modules.java:559)
at com.sun.tools.javac.comp.Modules.enter(Modules.java:287)
at com.sun.tools.javac.comp.Modules.enter(Modules.java:268)
at com.sun.tools.javac.comp.Modules.initModules(Modules.java:259)
at
com.sun.tools.javac.main.JavaCompiler.initModules(JavaCompiler.java:1126)
at com.sun.tools.javac.api.JavacTaskImpl.enter(JavacTaskImpl.java:393)
at com.sun.tools.javac.api.JavacTaskImpl.enter(JavacTaskImpl.java:327)
at
org.netbeans.modules.java.source.parsing.JavacParser.moveToPhase(JavacParser.java:660)
at
org.netbeans.modules.java.source.parsing.CompilationInfoImpl.toPhase(CompilationInfoImpl.java:361)
at
org.netbeans.api.java.source.CompilationController.toPhase(CompilationController.java:84)
at
org.netbeans.api.java.source.WorkingCopy.toPhase(WorkingCopy.java:193)
at
org.netbeans.modules.refactoring.java.spi.RefactoringVisitor.setWorkingCopy(RefactoringVisitor.java:110)
at
org.netbeans.modules.refactoring.java.spi.JavaRefactoringPlugin$TransformTask.run(JavaRefactoringPlugin.java:425)
at
org.netbeans.modules.refactoring.java.spi.JavaRefactoringPlugin$TransformTask.run(JavaRefactoringPlugin.java:408)
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:317)
at
org.netbeans.modules.refactoring.java.spi.JavaRefactoringPlugin.processFiles(JavaRefactoringPlugin.java:263)
at
org.netbeans.modules.refactoring.java.spi.JavaRefactoringPlugin.processFiles(JavaRefactoringPlugin.java:245)
at
org.netbeans.modules.refactoring.java.spi.JavaRefactoringPlugin.createAndAddElements(JavaRefactoringPlugin.java:326)
at
org.netbeans.modules.refactoring.java.plugins.RenameRefactoringPlugin.prepare(RenameRefactoringPlugin.java:626)
[catch] 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)
Martin