apache / netbeans

Apache NetBeans

Home Page:https://netbeans.apache.org/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

NetBeans renames classes only in declaring files, but not in client files

PavelTurk opened this issue · comments

Apache NetBeans version

Apache NetBeans 22 release candidate

What happened

NetBeans sometimes renames classes/enum/iterfaces etc only in files, that declare them, but not in files, that use them. I see this problem for projects that use JPMS (have explicit module-info). This bug is linked to #3725 and was previously describe there.

Product Version: Apache NetBeans IDE 22-rc1
Java: 21.0.2; OpenJDK 64-Bit Server VM 21.0.2+13-58
Runtime: OpenJDK Runtime Environment 21.0.2+13-58
System: Linux version 5.15.0-88-generic running on amd64; UTF-8; en_US (nb)

Language / Project Type / NetBeans Component

Java Maven Project using Java Modules (JPMS)

How to reproduce

I don't have a solution to reproduce this bug. Earlier I used the steps described in #3725 (comment) however they don't work any more.

Did this work correctly in an earlier version?

No / Don't know

Operating System

Ubuntu 20.04.3 LTS

JDK

Java: 21.0.2; OpenJDK 64-Bit Server VM 21.0.2+13-58

Apache NetBeans packaging

Apache NetBeans binary zip

Anything else

No response

Are you willing to submit a pull request?

No

Sometimes I get this message while renaming:

Screenshot from 2024-05-05 12-10-38

And this is IDE log:

SEVERE [org.openide.util.Exceptions]
java.lang.NullPointerException: Cannot invoke "org.netbeans.modules.maven.model.pom.Properties.getProperty(String)" because "pr" is null
	at org.netbeans.modules.maven.refactoring.MavenRefactoringPlugin.lambda$prepare$0(MavenRefactoringPlugin.java:105)
	at org.netbeans.modules.maven.model.Utilities.performPOMModelOperations(Utilities.java:326)
	at org.netbeans.modules.maven.model.Utilities.performPOMModelOperations(Utilities.java:277)
	at org.netbeans.modules.maven.refactoring.MavenRefactoringPlugin.lambda$prepare$1(MavenRefactoringPlugin.java:125)
	at org.openide.filesystems.EventControl.runAtomicAction(EventControl.java:102)
	at org.openide.filesystems.FileSystem.runAtomicAction(FileSystem.java:494)
	at org.netbeans.modules.maven.refactoring.MavenRefactoringPlugin.prepare(MavenRefactoringPlugin.java:124)
[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:1420)
	at org.netbeans.modules.openide.util.GlobalLookup.execute(GlobalLookup.java:45)
	at org.openide.util.lookup.Lookups.executeWith(Lookups.java:287)
	at org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:2035)

At the same time I don't know if these problems are related or not.

Sometimes I get this message while renaming:

this got fixed and should be in NB 22 rc3 #7361