NPE in Element when removing empty children
-------------------------------------------
Key: TAP5-675
URL: https://issues.apache.org/jira/browse/TAP5-675
Project: Tapestry 5
Issue Type: Bug
Components: tapestry-core
Affects Versions: 5.1.0.4
Reporter: Dan Adams
I have a page that renders an XML sitemap:
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9"
xmlns:t="http://tapestry.apache.org/schema/tapestry_5_0_0.xsd">
<t:loop source="items" value="item" t:mixins="domlistener">
<url>
<loc>${url.url}</loc>
<lastmod><t:output value="url.lastModified"
format="literal:yyyy-MM-dd" /></lastmod>
<changefreq>${url.changeFrequency}</changefreq>
<t:if
test="showPriority"><priority>${url.priority}</priority></t:if>
</url>
</t:loop>
</urlset>
class:
void onEndElementFromLoop(Element el) {
if (el.getChildren().isEmpty())
el.remove(); /// NPE HERE
}
An NPE gets thrown at org.apache.tapestry5.dom.Node.remove(Node.java:186).
Appears to be the same issue or related to TAP5-640
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.