You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@jena.apache.org by "Ian McLaughlin (JIRA)" <ji...@apache.org> on 2012/09/18 15:32:07 UTC
[jira] [Created] (JENA-326) NTripleReader needs a null-guard
Ian McLaughlin created JENA-326:
-----------------------------------
Summary: NTripleReader needs a null-guard
Key: JENA-326
URL: https://issues.apache.org/jira/browse/JENA-326
Project: Apache Jena
Issue Type: Bug
Components: Jena
Affects Versions: Jena 2.7.3
Reporter: Ian McLaughlin
Priority: Minor
com.hp.hpl.jena.rdf.model.impl.NTripleReader.java line 140 has
try {
predicate = model.createProperty(readResource().getURI());
} catch (Exception e1) {
errorHandler.fatalError(e1);
}
In readResource() there is
if (badEOF())
return null;
So when my test attempts to read truncated XML as NTriple, I get a null pointer exception. Other conditions in readResource() throw SyntaxErrors before returning, so that may be missing from this condtition.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (JENA-326) NTripleReader needs a null-guard
Posted by "Andy Seaborne (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/JENA-326?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13459570#comment-13459570 ]
Andy Seaborne commented on JENA-326:
------------------------------------
Thanks - fix in svn.
There is a better and faster NTriples parser currently in ARQ (RIOT) due to be moved into Jena.
Any call into ARQ will initialise model reading to use this parser or explicitly ARQ.init().
But it does not read truncated XML either!
> NTripleReader needs a null-guard
> --------------------------------
>
> Key: JENA-326
> URL: https://issues.apache.org/jira/browse/JENA-326
> Project: Apache Jena
> Issue Type: Bug
> Components: Jena
> Affects Versions: Jena 2.7.3
> Reporter: Ian McLaughlin
> Priority: Minor
>
> com.hp.hpl.jena.rdf.model.impl.NTripleReader.java line 140 has
> try {
> predicate = model.createProperty(readResource().getURI());
> } catch (Exception e1) {
> errorHandler.fatalError(e1);
> }
> In readResource() there is
> if (badEOF())
> return null;
> So when my test attempts to read truncated XML as NTriple, I get a null pointer exception. Other conditions in readResource() throw SyntaxErrors before returning, so that may be missing from this condtition.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Resolved] (JENA-326) NTripleReader needs a null-guard
Posted by "Andy Seaborne (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/JENA-326?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Andy Seaborne resolved JENA-326.
--------------------------------
Resolution: Fixed
Assignee: Andy Seaborne
> NTripleReader needs a null-guard
> --------------------------------
>
> Key: JENA-326
> URL: https://issues.apache.org/jira/browse/JENA-326
> Project: Apache Jena
> Issue Type: Bug
> Components: Jena
> Affects Versions: Jena 2.7.3
> Reporter: Ian McLaughlin
> Assignee: Andy Seaborne
> Priority: Minor
>
> com.hp.hpl.jena.rdf.model.impl.NTripleReader.java line 140 has
> try {
> predicate = model.createProperty(readResource().getURI());
> } catch (Exception e1) {
> errorHandler.fatalError(e1);
> }
> In readResource() there is
> if (badEOF())
> return null;
> So when my test attempts to read truncated XML as NTriple, I get a null pointer exception. Other conditions in readResource() throw SyntaxErrors before returning, so that may be missing from this condtition.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Closed] (JENA-326) NTripleReader needs a null-guard
Posted by "Andy Seaborne (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/JENA-326?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Andy Seaborne closed JENA-326.
------------------------------
> NTripleReader needs a null-guard
> --------------------------------
>
> Key: JENA-326
> URL: https://issues.apache.org/jira/browse/JENA-326
> Project: Apache Jena
> Issue Type: Bug
> Components: Jena
> Affects Versions: Jena 2.7.3
> Reporter: Ian McLaughlin
> Assignee: Andy Seaborne
> Priority: Minor
>
> com.hp.hpl.jena.rdf.model.impl.NTripleReader.java line 140 has
> try {
> predicate = model.createProperty(readResource().getURI());
> } catch (Exception e1) {
> errorHandler.fatalError(e1);
> }
> In readResource() there is
> if (badEOF())
> return null;
> So when my test attempts to read truncated XML as NTriple, I get a null pointer exception. Other conditions in readResource() throw SyntaxErrors before returning, so that may be missing from this condtition.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira