commonsrdf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From st...@apache.org
Subject [4/5] incubator-commonsrdf git commit: JsonLdDataset - Correct getGraph()
Date Fri, 04 Nov 2016 09:02:04 GMT
JsonLdDataset - Correct getGraph()


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

Branch: refs/heads/master
Commit: 5cd68e6742e906e0681466082bbcae9399d32cb5
Parents: 2e5cf8f
Author: Stian Soiland-Reyes <stain@apache.org>
Authored: Fri Nov 4 10:01:29 2016 +0100
Committer: Stian Soiland-Reyes <stain@apache.org>
Committed: Fri Nov 4 10:01:29 2016 +0100

----------------------------------------------------------------------
 .../java/org/apache/commons/rdf/jsonldjava/JsonLdDataset.java     | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-commonsrdf/blob/5cd68e67/jsonld-java/src/main/java/org/apache/commons/rdf/jsonldjava/JsonLdDataset.java
----------------------------------------------------------------------
diff --git a/jsonld-java/src/main/java/org/apache/commons/rdf/jsonldjava/JsonLdDataset.java
b/jsonld-java/src/main/java/org/apache/commons/rdf/jsonldjava/JsonLdDataset.java
index b191745..6b65ab5 100644
--- a/jsonld-java/src/main/java/org/apache/commons/rdf/jsonldjava/JsonLdDataset.java
+++ b/jsonld-java/src/main/java/org/apache/commons/rdf/jsonldjava/JsonLdDataset.java
@@ -69,7 +69,8 @@ class JsonLdDatasetImpl extends AbstractJsonLdGraphLike<org.apache.commons.rdf.a
         if (graphName == null) {
             return Optional.of(getGraph());
         }
-        return getGraphNames().map(g -> (Graph) new JsonLdGraphImpl(rdfDataSet, Optional.of(g),
bnodePrefix)).findAny();
+        
+        return Optional.of(new JsonLdGraphImpl(rdfDataSet, Optional.of(graphName), bnodePrefix));
     }
 
     @Override


Mime
View raw message