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.

Bug 44720

Summary: AssertionError: Class not found in Index
Product: editor Reporter: vbrabant <vbrabant>
Component: RefactoringAssignee: issues@java <issues>
Status: CLOSED FIXED    
Severity: blocker    
Priority: P2    
Version: 4.x   
Hardware: PC   
OS: Other   
Issue Type: DEFECT Exception Reporter:
Bug Depends on:    
Bug Blocks: 44713    

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
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:
Created dir:
Compiling 1 source file to
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
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(

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

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
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)