This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
I have a Main Class. I decided to move the class to the default package: But I do it by using drag and drop via the mouse. I am positively surpised that Refactoring dialog box appeared. Everythings happened correctly. I run the project, selected the class Main. Nb recompiled the source and execute it. Remark the java source file continue to be marked as uncompiled. Even after a Build Main Project and Clean and Build Main Project. Strange behaviour. Remark: the package tiger continue to be present, but is now empty. Now, I decided to do inverse operation, but via the refactoring menu, and not via drag and drop. And I received the following message: java.lang.StringIndexOutOfBoundsException: String index out of range: -1 at java.lang.String.substring(String.java:1687) at org.netbeans.modules.refactoring.ui.MoveClassUI.getResPackageName(MoveClassUI.java:102) at org.netbeans.modules.refactoring.ui.MoveClassUI.getPanel(MoveClassUI.java:87) at org.netbeans.modules.refactoring.api.ui.ParametersPanel.<init>(ParametersPanel.java:96)
I am able to reproduce it too - attached exception
Created attachment 15650 [details] Exception
Fixed. /cvs/java/javacore/src/org/netbeans/modules/javacore/jmiimpl/javamodel/ResourceImpl.java,v <-- ResourceImpl.java new revision: 1.7; previous revision: 1.6 done Processing log script arguments... More commits to come... Checking in refactoring/src/org/netbeans/modules/refactoring/ui/MoveClassUI.java; /cvs/refactoring/src/org/netbeans/modules/refactoring/ui/MoveClassUI.java,v <-- MoveClassUI.java new revision: 1.4; previous revision: 1.3 done
verified