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.
|Summary:||AssertionError: Class not found in Index|
|Issue Type:||DEFECT||Exception Reporter:|
|Bug Depends on:|
Description vbrabant 2004-06-10 21:21:15 UTC
I runned the 20040608 trunk release to test refactoring and MDR. I created a totally new JS2E Application Project. I called it Tiger, because it will be a Tiger Application. after 5 minutes, I had possibility to edit the Main Class. I add a System.out.println("Hello World"); into the main method. And click on F6 to execute it. I can see the following: init: deps-jar: Created dir: D:\Test_20040608_NB40\j2seTigerApplication\build\classes Compiling 1 source file to D:\Test_20040608_NB40\j2seTigerApplication\build\classes compile: run: Hello World BUILD SUCCESSFUL (total time: 11 seconds) Remark: It would be nice is what is printed on the console from the program appears in a different colours than what is printed by Ant. Now, I looked at the Refactoring menu, and noted that I can Move the class. So, I decided to move the class to the default package. Everythings happened correctly. Now, I decided to do inverse operation, but via the refactoring menu, and not 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) So, I decided to continue with the drag and drop procedure, and it worked like a charm. Really stange as situation, because, now, I was able to Move Class via the Refactoring menu. I choosed to move it to a new package, called tiger.newpackage. So, I created the new package, and moved the class. I decided to move anew that class into the default directory, via the refactoring menu. I obtained a Dialog box, with a Please Wait message, and nothing else. I decided to accept the invitation and waited. But finally, I stopped to wait and close the window. I tried to run the project, by pressing F6, but I received the following message: java.lang.AssertionError: Class not found in index: tiger.newpackage.Main at org.netbeans.modules.javacore.parser.MDRParser.resolveSuperTypes(MDRParser.java:1024) at org.netbeans.modules.javacore.parser.MDRParser.processAST(MDRParser.java:230)
Comment 1 Jan Becicka 2004-06-14 15:56:23 UTC
Cannot reproduce after fix of issue 44718.
Comment 2 Jan Becicka 2004-06-14 17:28:17 UTC
Damn, it is still reproducible.
Comment 3 Jan Becicka 2004-06-14 18:49:57 UTC
This one is P2 IMO.
Comment 4 Jan Becicka 2004-06-14 18:59:01 UTC
*** Issue 44084 has been marked as a duplicate of this issue. ***
Comment 5 Martin Matula 2004-06-17 15:13:40 UTC
This is fixed. Error recovery code now makes sure that the AssertionError no longer occurs.
Comment 6 Jiri Prox 2005-07-19 12:17:37 UTC
verified in 4.2 (200507181000)