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 66074

Summary: Java Source Editor throws exception when editing
Product: java Reporter: waynezhang <waynezhang>
Component: UnsupportedAssignee: issues@java <issues>
Status: RESOLVED DUPLICATE    
Severity: blocker    
Priority: P3    
Version: 5.x   
Hardware: PC   
OS: Windows XP   
Issue Type: DEFECT Exception Reporter:

Description waynezhang 2005-10-06 03:35:49 UTC
When coding in the Java source editor, and the words are not completed, then the
symantic check(? a background thread) runs, exception will throw:

**************
java.lang.ClassCastException: org.netbeans.jmi.javamodel.StringLiteral$Impl
	at
org.netbeans.modules.javacore.jmiimpl.javamodel.TypeReferenceImpl.initChildren(TypeReferenceImpl.java:65)
	at
org.netbeans.modules.javacore.jmiimpl.javamodel.MultipartIdImpl.initChildren(MultipartIdImpl.java:46)
	at
org.netbeans.modules.javacore.jmiimpl.javamodel.TypeReferenceImpl.getParent(TypeReferenceImpl.java:36)
	at org.netbeans.jmi.javamodel.MultipartId$Impl.getParent(Unknown Source)
	at
org.netbeans.modules.javacore.jmiimpl.javamodel.TypeReferenceImpl.getChildren(TypeReferenceImpl.java:55)
	at
org.netbeans.modules.javacore.jmiimpl.javamodel.MultipartIdImpl.getChildren(MultipartIdImpl.java:186)
	at
org.netbeans.modules.javacore.jmiimpl.javamodel.ElementFinder.getElementByOffset(ElementFinder.java:40)
	at
org.netbeans.modules.javacore.jmiimpl.javamodel.ResourceImpl.getElementByOffset(ResourceImpl.java:1640)
	at
org.netbeans.modules.j2ee.ejbcore.hints.EjbHintsProvider.getHints(EjbHintsProvider.java:82)
	at
org.netbeans.modules.editor.hints.HintsOperator$HintPopupTaskImpl.run(HintsOperator.java:233)
	at org.openide.util.Task.run(Task.java:207)
	at org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:469)
[catch] at
org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:870)
***************


What I am typing in is :

	// initialize the configuation from cmd
	if(args.length > 1 && "-config".equalsIgnore***args[0]){
	    
	}

which *** is the current cursor. Then the above exception always throws(about
half second). When I move the cursor from current position(i.e. ***), exception
 throw stops.

Thanks!
Comment 1 Martin Matula 2005-10-18 13:49:36 UTC

*** This issue has been marked as a duplicate of 65463 ***
Comment 2 Quality Engineering 2007-09-20 09:45:24 UTC
Reorganization of java component