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 159585 - NPE in org.netbeans.editor.ext.html.parser.SyntaxElement.Tag.toString()
Summary: NPE in org.netbeans.editor.ext.html.parser.SyntaxElement.Tag.toString()
Status: RESOLVED FIXED
Alias: None
Product: web
Classification: Unclassified
Component: HTML Editor (show other bugs)
Version: 6.x
Hardware: All All
: P3 blocker (vote)
Assignee: Marek Fukala
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-03-04 08:08 UTC by emi
Modified: 2009-05-18 10:45 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
Patch to avoid the NPE (969 bytes, patch)
2009-03-04 08:19 UTC, emi
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description emi 2009-03-04 08:08:53 UTC
toString() tries to create an iterator in attribs but attribs may be null hence the NPE.

This bug may be seen when logging is set to FINEST or very low values and SyntaxElement-s are being logged (for example
in HtmlGSFParser).
Comment 1 emi 2009-03-04 08:19:33 UTC
Created attachment 77688 [details]
Patch to avoid the NPE
Comment 2 Marek Fukala 2009-03-04 09:42:42 UTC
This issue was already fixed. Thanks for the patch anyway.
Comment 3 emi 2009-03-04 09:59:08 UTC
That's odd, I've looked at main-golden before submitting the patch and not on main (
http://hg.netbeans.org/main/file/595d5e077d87/html.editor.lib/src/org/netbeans/editor/ext/html/parser/SyntaxElement.java
) and the bug is still there.

What branch are you guys working on ?
Comment 4 Marek Fukala 2009-03-04 10:34:24 UTC
Oops, that's really odd. I overlooked that there are two classes called SyntaxElement in the same module. I did fix of
the second one yesterday:

http://hg.netbeans.org/jet-parsing-api/diff/6c70bf8ec292/html.editor.lib/src/org/netbeans/editor/ext/html/parser/SyntaxElement.java

Moreover pushed just to the jet-parsing-api repo, which will likely be merged to main repository this week.

I'll fix the second class as well and I'll do that in trunk.

I am really sorry for the confusion and thanks for finding the bug a posting the patch.
Comment 5 Marek Fukala 2009-03-04 10:54:10 UTC
both classes are fixed in *main* now:

http://hg.netbeans.org/main/rev/119b1384ebed
http://hg.netbeans.org/main/rev/9c5f6ad917bc