| Summary: | [api] Class cast exception in org.eclipse.wst.css.core.internal.document.CSSSelector.getParentElement(Element) | ||||||
|---|---|---|---|---|---|---|---|
| Product: | [WebTools] WTP Source Editing | Reporter: | Sarika Sinha <sarika.sinha> | ||||
| Component: | wst.css | Assignee: | Sarika Sinha <sarika.sinha> | ||||
| Status: | CLOSED FIXED | QA Contact: | Nick Sandonato <nsand.dev> | ||||
| Severity: | normal | ||||||
| Priority: | P3 | CC: | thatnitind | ||||
| Version: | unspecified | ||||||
| Target Milestone: | 3.2.3 | ||||||
| Hardware: | PC | ||||||
| OS: | Windows XP | ||||||
| Whiteboard: | |||||||
| Attachments: |
|
||||||
|
Description
Sarika Sinha
Created attachment 177700 [details]
Patch to replace class cast exception with instanceof check in cssselector
This patch replace the throwing of class cast exception with instance of check in cssSelector.getParentElement
Hi, Sarika. Patch looks good overall. The one change I made was just a simplification of the if statement to be if(parent instanceof Element) since null is not an instance of Element, it would fail the check anyway. Thanks for the fix. Actually, it looks like Nitin released a fix yesterday that accomplished this change. His is slightly different though, but doesn't use the instanceof check. instead it uses Node#getNodeType() == Node.ELEMENT_NODE. Thanks for the patch, though. Thanks Nick. |