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 27166 - NullPointerException at FilterNode$Children.getNodes()
Summary: NullPointerException at FilterNode$Children.getNodes()
Status: VERIFIED FIXED
Alias: None
Product: xml
Classification: Unclassified
Component: Tree-Edit (show other bugs)
Version: 3.x
Hardware: PC Linux
: P2 blocker (vote)
Assignee: _ lkramolis
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2002-09-10 12:57 UTC by Martin Schovanek
Modified: 2007-09-25 06:06 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
NullPointerException (3.41 KB, text/plain)
2002-09-10 12:58 UTC, Martin Schovanek
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Martin Schovanek 2002-09-10 12:57:06 UTC
[Nb Build 200209100100, jdk1.4.1-rc-b19]

Expanding DTD or XML nodes throws
NullPointerException.
Other nodes like Java, ANT, etc. vorks fine.
Comment 1 Martin Schovanek 2002-09-10 12:58:00 UTC
Created attachment 7361 [details]
NullPointerException
Comment 2 _ lkramolis 2002-09-11 16:36:00 UTC
Fixed in main trunk.

http://xml.netbeans.org/servlets/ReadMsg?msgId=377432&listName=cvs
Comment 3 Petr Nejedly 2002-09-12 08:55:44 UTC
If I understand it correctly, you have a subclass of FilterNode
tnat directly manipulates the "protected Node original" field
and even set it to null.
I myself consider it breaking the contract as the doc of the field is:
/** Original node. Should not be modified. */
protected Node original;

only since openapi 1.39, there is a protected changeOriginal(Node)
which does all the actions needed to correctly replace the original
node while your updateOriginal(Node) does none of them.

Please consider rewriting that stuff, you can get more
NPEs otherwise.
Comment 4 Petr Nejedly 2002-09-12 08:57:50 UTC
I meant subclass of FilterNode.Children
Comment 5 _ lkramolis 2002-09-12 17:07:43 UTC
Petr, you are right. It was written in time the changeOriginal(Node)
method did not exist. I will rewrite it to use the method.
Comment 6 _ lkramolis 2002-09-12 17:16:15 UTC
Fixed also in QBE200209110100 branch.
Comment 7 Martin Schovanek 2002-11-13 15:19:59 UTC
VERIFIED