Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
Jena 3.14.0
-
None
Description
Hi Jena Team and Andy, thanks for all your great work on Jena and fixing all my recent issues, but I found another one
The Trig Parser yields quads with a null value in the graph component for data in the default graph. It should be Quad.defaultGraphNodeGenerated.
Test data:
# test.trig @base <http://www.example.org/base-> . @prefix : <http://www.example.org/prefx-> . <s> <p> <o> . :x :y :z .
Iterator<Quad> it = RDFDataMgr.createIteratorQuads(RDFDataMgr.open("test.trig"), Lang.TRIG, null); while(it.hasNext()) { Quad q = it.next(); System.out.println(q.getGraph()); }
null null
This causes quite unexpected null pointer exceptions, such as in this simple scenario:
Dataset ds = RDFDataMgr.loadDataset("test.trig"); System.out.println(ds.asDatasetGraph().size());
Attachments
Issue Links
- links to