[
https://issues.apache.org/jira/browse/JENA-2193?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17439287#comment-17439287
]
Andy Seaborne commented on JENA-2193:
-------------------------------------
Running the example, with the current parser setup (RIOT), I get one error and
it terminates on error.
{noformat}
13:34:57 ERROR riot :: [line: 12, col: 14] {E201} The attributes on
this property element, are not permitted with any content; expecting end
element tag.
Exception in thread "main" org.apache.jena.riot.RiotException: [line: 12, col:
14] {E201} The attributes on this property element, are not permitted with any
content; expecting end element tag.
{noformat}
The example seems to be running with only jena-core or with the Jena jars have
been shaded incorrectly.
Then, there are three errors before the NPE.
An error in not a warning. Continuing after error has no guarantees.
{noformat}
14:01:22 ERROR RDFDefaultErrorHandler :: (line 12 column 14): {E201} The
attributes on this property element, are not permitted with any content;
expecting end element tag.
14:01:22 ERROR RDFDefaultErrorHandler :: (line 12 column 24): {E201} XML
element <nbc:title> inside an empty property element, whose attributes prohibit
any content.
14:01:22 ERROR RDFDefaultErrorHandler :: (line 12 column 45): {E201} The
attributes on this property element, are not permitted with any content;
expecting end element tag.
{noformat}
> XMLHandler#endElement can throw NPE
> -----------------------------------
>
> Key: JENA-2193
> URL: https://issues.apache.org/jira/browse/JENA-2193
> Project: Apache Jena
> Issue Type: Improvement
> Reporter: Henry Kuijpers
> Priority: Major
> Attachments: screenshot-1.png
>
>
> In our case:
> {code:java}
> package org.apache.jena.rdfxml.xmlinput.impl;
> public class XMLHandler extends ... {
> public void endElement(String uri, String localName, String rawName)
> throws SAXException {
> this.frame.endElement();
> this.frame = this.frame.getParent();
> this.frame.afterChild();
> }
> }
> {code}
> The result of getParent was null, which triggered a NullPointerException.
> However, maybe the issue is one of the upper layers (I'm not too familiar
> with all the internals of JENA/RDF and I also don't see any nullability
> annotations)?
--
This message was sent by Atlassian Jira
(v8.3.4#803005)