You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tapestry.apache.org by "Howard M. Lewis Ship (JIRA)" <ji...@apache.org> on 2011/04/01 02:18:05 UTC
[jira] [Closed] (TAP5-675) NPE in Element when removing empty
children
[ https://issues.apache.org/jira/browse/TAP5-675?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Howard M. Lewis Ship closed TAP5-675.
-------------------------------------
Resolution: Cannot Reproduce
Assignee: Howard M. Lewis Ship
I'm assuming that TAP5-640 does fix this. Please provide a test (a unit test, preferably) that reproduces this if not.
> 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
> Assignee: Howard M. Lewis Ship
>
> 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.
For more information on JIRA, see: http://www.atlassian.com/software/jira