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 - Classcast exception in the generated (copied) DiffLexer
Summary: Classcast exception in the generated (copied) DiffLexer
Status: RESOLVED FIXED
Alias: None
Product: editor
Classification: Unclassified
Component: Lexer (show other bugs)
Version: 3.x
Hardware: PC Linux
: P3 blocker (vote)
Assignee: issues@editor
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-01-12 11:00 UTC by Jaroslav Tulach
Modified: 2003-05-19 17:48 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
Diff that should be testable (24.07 KB, application/octet-stream)
2003-01-12 11:07 UTC, Jaroslav Tulach
Details

Note You need to log in before you can comment on or make changes to this bug.
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