Details
-
Improvement
-
Status: Open
-
Minor
-
Resolution: Unresolved
-
9.0
-
None
-
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
Description
Renaming a package throws Module Java Refactoring threw java.lang.NullPointerException. 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.
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) in the projects window. 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 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.