E.P.A. Meuwese created NETBEANS-1354:
----------------------------------------
Summary: Refactoring renaming a package doesn't rename package
name in exports in module-info, in class and package-info
Key: NETBEANS-1354
URL: https://issues.apache.org/jira/browse/NETBEANS-1354
Project: NetBeans
Issue Type: Improvement
Components: java - Refactoring
Affects Versions: 9.0
Environment: NetBeans 9.0(Build
incubator-netbeans-release-334-on-20180708), Java 1.8.0_172, 10.0.2,11, Windows
10, Maven 3.5.4
Reporter: E.P.A. Meuwese
Fix For: Next
Renaming a package throws Module Java Refactoring threw
java.lang.NullPointerException. {color:#333333}And the exports for that package
in module-info is not renamed. package in package-info and classes are not
renamed to the new packages.{color}
To reproduce:
NetBeans 9.0(Build incubator-netbeans-release-334-on-20180708) runs on Java
1.8.0_172 Create a Maven Java project, source and compiler Java 10 or 11.
Create a package and module-info.java which exports that package. And the
package should contain some classes and package-info.
Problem 1)
Then when you right click on a package and select " Refactor" than "Rename.."
or (Ctrl+R) i{color:#333333}n the projects window{color}. {color:#333333} And
c{color}hange the name of the package.
That results in a renamed package and the classes in the package are moved to
the new package.
Except that the exports for that package in module-info is not renamed and the
package in package-info and in the classes are not renamed to the new package
name.
Problem 2)
When open a class in the editor window and right click on the package package
and select " Refactor" than "Rename.." or (Ctrl+R) on the package name. And
change the name of the package.
That results in a renamed package and the classes in the package are moved to
the new package.
Except that the exports for that package in module-info is not renamed and the
package in package-info and in the class are not renamed to the new package
name.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists