Hi there, in my opinion this is a bug:

 * 
https://github.com/apache/commons-rdf/blob/006fbc3e47003c2d0fe8eb055f60f7cb267e1321/commons-rdf-rdf4j/src/main/java/org/apache/commons/rdf/rdf4j/impl/ModelGraphImpl.java#L142
 * 
https://github.com/apache/commons-rdf/blob/006fbc3e47003c2d0fe8eb055f60f7cb267e1321/commons-rdf-rdf4j/src/main/java/org/apache/commons/rdf/rdf4j/impl/ModelGraphImpl.java#L150

Because nobody expects a parallel stream to be created and returned when stream() is called. There is also a great danger that this parallel stream will be used to perform write operations with RDF4J. However, RDF4J is not thread-safe and this can lead to non-deterministic results.

What is your opinion on this?

Thanks Fredy

Reply via email to