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.
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)
Created attachment 8540 [details] Diff that should be testable
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