[
https://issues.apache.org/jira/browse/JENA-1011?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14704741#comment-14704741
]
Andy Seaborne commented on JENA-1011:
-------------------------------------
The workaround is not perfect or it exposes another issue.
Calling {{.hasNext()}} after a Iterator has finished causes:
{noformat}
Exception in thread "main" org.apache.jena.riot.RiotException: Producer dead
at
org.apache.jena.riot.lang.PipedRDFIterator.hasNext(PipedRDFIterator.java:255)
at dev.ExampleIteratorParsing.example(ExampleIteratorParsing.java:67)
at dev.ExampleIteratorParsing.main(ExampleIteratorParsing.java:51)
{noformat}
> RiotReader.createIteratorTriples causes NPE for some syntaxes.
> --------------------------------------------------------------
>
> Key: JENA-1011
> URL: https://issues.apache.org/jira/browse/JENA-1011
> Project: Apache Jena
> Issue Type: Bug
> Components: RIOT
> Affects Versions: Jena 3.0.0
> Reporter: Andy Seaborne
> Assignee: Andy Seaborne
> Priority: Minor
> Attachments: ExampleIteratorParsing.java
>
>
> Some syntaxes (e.g. JSON-LD, TRIX) cause the async thread parsing to throw a
> null pointer exception.
> Changing {{RiotReader::parse}} to:
> {noformat}
> RDFDataMgr.parse(dest, in, baseIRI, lang);
> {noformat}
> then causes "Producer dead".
> Adding {{out.start}}/{{out.finish}} nesting in {{createIteratorTriples}}
> causes "Pipe closed".
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)