| Summary: | Wrong null-handling in StaticNameResolver | ||||||||
|---|---|---|---|---|---|---|---|---|---|
| Product: | [WebTools] WTP Source Editing | Reporter: | Jesper Moller <jesper> | ||||||
| Component: | wst.xpath | Assignee: | Jesper Moller <jesper> | ||||||
| Status: | RESOLVED FIXED | QA Contact: | Jesper Moller <jesper> | ||||||
| Severity: | major | ||||||||
| Priority: | P3 | CC: | d_a_carver, neil.hauge | ||||||
| Version: | 3.3 | Flags: | jesper:
pmc_approved?
(david_williams) jesper: pmc_approved? (raghunathan.srinivasan) jesper: pmc_approved? (naci.dai) jesper: pmc_approved? (deboer) neil.hauge: pmc_approved+ jesper: pmc_approved? (kaloyan) jesper: pmc_approved? (cbridgha) d_a_carver: review+ |
||||||
| Target Milestone: | 3.3 RC1 | ||||||||
| Hardware: | All | ||||||||
| OS: | All | ||||||||
| Whiteboard: | PMC_approved | ||||||||
| Attachments: |
|
||||||||
|
Description
Jesper Moller
Created attachment 195266 [details]
Patch for this issue
This patch cleans up the calls into StaticContext re. namespace contexts
Created attachment 195280 [details]
Tests
The new test in TestBugs addresses this feature.
The other changes clean up the test preconditions which were not quite right,
Could you review this, I'm trying to get this into RC1, since it breaks the XPath view for some common cases?
The description is slightly wrong, since it's local scopes ("for each a$ in ...") which causes the NPE, not function names.
* Explain why you believe this is a stop-ship defect. Or, if it is a "hotbug" (requested by an adopter) please document it as such. It's a regression, and it gives an ugly NPE in the error log * Is there a work-around? If so, why do you believe the work-around is insufficient? Only workaround is to qualify variable names in the XPath editor and set up a namespace, which is cumbersome. * How has the fix been tested? Is there a test case attached to the bugzilla record? Has a JUnit Test been added? Tested manually by me (Mac + WinXP), tested by the 8000+ test cases, plus a new one I added especially for this * Give a brief technical overview. Who has reviewed this fix? The current code resolved the namespace prefix for variables in several different places, and one place forgot to guard or missing namespaces, which is marked internally by null. David Carver is reviewing this currently. * What is the risk associated with this fix? Quite low - it's a single class, and the new code is clearer and has less duplicated logic. Looks good. Committed, tagged and released |