| Summary: | NPE thrown when selecting 'Edit Namespace Prefixes' from the 'XPath' view's view menu with no editors open | ||||||
|---|---|---|---|---|---|---|---|
| Product: | [WebTools] WTP Source Editing | Reporter: | Remy Suen <remy.suen> | ||||
| Component: | wst.xpath | Assignee: | Jesper Moller <jesper> | ||||
| Status: | RESOLVED FIXED | QA Contact: | Jesper Moller <jesper> | ||||
| Severity: | normal | ||||||
| Priority: | P3 | CC: | david_williams, d_a_carver, raghunathan.srinivasan, thatnitind | ||||
| Version: | 3.2 | Flags: | d_a_carver:
review+
|
||||
| Target Milestone: | 3.2.3 | ||||||
| Hardware: | PC | ||||||
| OS: | Windows XP | ||||||
| Whiteboard: | |||||||
| Bug Depends on: | |||||||
| Bug Blocks: | 348768 | ||||||
| Attachments: |
|
||||||
|
Description
Remy Suen
Created attachment 187068 [details]
Double fix for this bug, against 3.2.x branch
Fixes this bug by adding an enabledWhen rule on the command, as well as making a null check if the SSE modelManager cannot somehow build us a model.
(Great to see actual bug reports for this component, there hasn't been that many, thanks Remy) Requesting a PMC approval for this trivial fix to an annoying NPE. * Explain why you believe this is a stop-ship defect. I wouldn't call it stop ship, but I do think that every exception in the log is one too many. * Is there a work-around? If so, why do you believe the work-around is insufficient? Obviously, the user could just refrain from choosing this command, but since the XML namespaces are tracked per-file, it's confusing that the menu item is available. * How has the fix been tested? Tested manually against current WTP 3.2.x, with no editor, Java editor (disabled) and XML, XSD, XSL editors (with no problems). No test case as this is mainly a declarative fix in plugin.xml. * Give a brief technical overview. Use an <enabledWhen> construct to check that an XML-oriented editor is active in order to allow the Dialog. * Who has reviewed this fix? I've assigned Dave Carver to do a review, but it is really trivial. * What is the risk associated with this fix? Worst case would be that a bug in the rule set disabled the dialog for all editors. That was specifically tested against. I am seeing this as a very low risk fix. (In reply to comment #2) > (Great to see actual bug reports for this component, there hasn't been that > many, thanks Remy) No problem, I was just testing compatibility with 4.1 and found this while I was clicking on things randomly. Of course I then realized after a bit of testing that this was not a compatibility problem. ;) Looks good. I'm sorry, I forgot to resolve this one, it was committed and tagged last week. Um, this is still broken in 3.3. :) I see a fix went in for R3_2_maintenance but not for HEAD. Should I reopen this bug or should I open a new bug? |