We're updating the issue view to help you get more done. 

Rio parser always stops on error when creating statement object

Description

In RDFParserBase.createStatement() an org.openrdf.model.Statement object is created from the parsed string tokens. When an error occurs during statement creation (for example because the ValueFactory throws an IllegalArgumentException for a malformed URI), this is caught, but it is then reported as a fatal error. It seems to me that this should not be treated as fatal: the current statement can not be further processed, but it is likely that if the parser were to continue, it would find further valid statements. To fix, I would suggest that instead of calling reportFatalErrror, it calls reportError. If the parser is set to not stop at the first error, it can then try and continue reading the rest of the file. By the way, as a side effect of this fix, it is possible that RDFHandler.handleStatement will be called with a null value. RDFHandlerBase should be adapted to cater for this (fail silently, I'd say).

Environment

None

Status

Assignee

Peter Ansell

Reporter

JeenB

Labels

None

Components

Fix versions

Affects versions

2.3.2

Priority

Major