Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 361803 - NodeType:dom_to_xpath and null value
Summary: NodeType:dom_to_xpath and null value
Status: RESOLVED FIXED
Alias: None
Product: WTP Source Editing
Classification: WebTools
Component: wst.xpath (show other bugs)
Version: unspecified   Edit
Hardware: PC Windows 7
: P3 normal (vote)
Target Milestone: 3.4 M6   Edit
Assignee: Jesper Moller CLA
QA Contact: Jesper Moller CLA
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-10-24 09:38 EDT by Lukasz Wycisk CLA
Modified: 2012-04-25 20:08 EDT (History)
0 users

See Also:


Attachments
Patch (4.60 KB, text/plain)
2011-10-24 09:38 EDT, Lukasz Wycisk CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Lukasz Wycisk CLA 2011-10-24 09:38:10 EDT
9. It is not a bug but we think it could be changed. NodeType:dom_to_xpath is a factory method to convert w3c .dom model to XPath model. It returns null when type is unknown. It should not happen in correct w3c implementation. However dom4j implementation has 13 number for own Namespace node. Our suggestion is to let this method return null for unknown types and add null check in each place it is used. There are 7 places but only 4 needed to be change:
ChildAxis
FollowingSiblingAxis
ParentAxis
PrecedingSiblingAxis
Comment 1 Lukasz Wycisk CLA 2011-10-24 09:38:26 EDT
Created attachment 205817 [details]
Patch
Comment 2 Jesper Moller CLA 2011-10-30 20:04:54 EDT
Patch looks good ... Reviewing and testing against HEAD and maintenance branches!
Comment 3 Jesper Moller CLA 2012-04-25 20:08:38 EDT
Regression tested and committed. Thanks, Lukasz!