commonsrdf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From st...@apache.org
Subject [13/50] incubator-commonsrdf git commit: only use putAll if intoGraph is empty
Date Fri, 07 Oct 2016 14:22:00 GMT
only use putAll if intoGraph is empty


Project: http://git-wip-us.apache.org/repos/asf/incubator-commonsrdf/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-commonsrdf/commit/a2e482fb
Tree: http://git-wip-us.apache.org/repos/asf/incubator-commonsrdf/tree/a2e482fb
Diff: http://git-wip-us.apache.org/repos/asf/incubator-commonsrdf/diff/a2e482fb

Branch: refs/heads/jena
Commit: a2e482fbc647b06ffaf6a5b6833f149731c10fad
Parents: 21b68ee
Author: Stian Soiland-Reyes <stain@apache.org>
Authored: Wed Apr 13 03:23:04 2016 +0100
Committer: Stian Soiland-Reyes <stain@apache.org>
Committed: Wed Apr 13 03:23:04 2016 +0100

----------------------------------------------------------------------
 .../org/apache/commons/rdf/jsonldjava/JsonLdParserBuilder.java   | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-commonsrdf/blob/a2e482fb/jsonld-java/src/main/java/org/apache/commons/rdf/jsonldjava/JsonLdParserBuilder.java
----------------------------------------------------------------------
diff --git a/jsonld-java/src/main/java/org/apache/commons/rdf/jsonldjava/JsonLdParserBuilder.java
b/jsonld-java/src/main/java/org/apache/commons/rdf/jsonldjava/JsonLdParserBuilder.java
index 0eeeeba..4b6edfe 100644
--- a/jsonld-java/src/main/java/org/apache/commons/rdf/jsonldjava/JsonLdParserBuilder.java
+++ b/jsonld-java/src/main/java/org/apache/commons/rdf/jsonldjava/JsonLdParserBuilder.java
@@ -95,8 +95,8 @@ public class JsonLdParserBuilder extends AbstractRDFParserBuilder {
 		}
 
 		Graph intoGraph = getIntoGraph().get();
-		if (intoGraph instanceof JsonLdGraph) {
-			// We can just move over the map content directly:
+		if (intoGraph instanceof JsonLdGraph && ! intoGraph.contains(null, null, null))
{
+			// Empty graph, we can just move over the map content directly:
 			JsonLdGraph jsonLdGraph = (JsonLdGraph) intoGraph;
 			jsonLdGraph.getRdfDataSet().putAll(rdfDataset);				
 		} else {


Mime
View raw message