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 29970

Summary: Classcast exception in the generated (copied) DiffLexer
Product: editor Reporter: Jaroslav Tulach <jtulach>
Component: LexerAssignee: issues@editor <issues>
Status: RESOLVED FIXED    
Severity: blocker    
Priority: P3    
Version: 3.x   
Hardware: PC   
OS: Linux   
Issue Type: DEFECT Exception Reporter:
Attachments: Diff that should be testable

Description Jaroslav Tulach 2003-01-12 11:00:37 UTC
Please checkout the branch

cd lexer
cvs upd -r uneasy_usage_29966

and unpack+modify attached zip file. Then invoke 

ant test

on the unpacked build.xml, ClassCastException
occurs. Source is unknown. StackTrace:

org.netbeans.modules.diff.lexer.DiffLexer.nextToken(DiffLexer.java:72)
org.netbeans.api.lexer.TokenUpdater.update(TokenUpdater.java:257)
org.netbeans.modules.lexer.demo.PaneDemo$2.update(PaneDemo.java:95)
org.netbeans.modules.lexer.demo.PaneDemo$2.insertUpdate(PaneDemo.java:84)
javax.swing.text.AbstractDocument.fireInsertUpdate(AbstractDocument.java:184)
javax.swing.text.AbstractDocument.handleInsertString(AbstractDocument.java:749)
javax.swing.text.AbstractDocument.insertString(AbstractDocument.java:706)
javax.swing.text.PlainDocument.insertString(PlainDocument.java:114)
javax.swing.text.DefaultEditorKit.read(DefaultEditorKit.java:254)
org.netbeans.modules.lexer.demo.PaneDemo.<init>(PaneDemo.java:104)
org.netbeans.modules.lexer.demo.PaneDemo.main(PaneDemo.java:62)
Comment 1 Jaroslav Tulach 2003-01-12 11:07:13 UTC
Created attachment 8540 [details]
Diff that should be testable
Comment 2 Miloslav Metelka 2003-05-19 17:48:13 UTC
I've changed the Antlr lexer example to use antlr.Token by default so
the exception should no longer happen when reusing the example
CalcLexer that is currently present under
lexer/demo/src/org/netbeans/modules/lexer/demo/antlr