commonsrdf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From st...@apache.org
Subject incubator-commonsrdf git commit: Avoid NPE for contextFilter
Date Mon, 20 Jun 2016 09:02:23 GMT
Repository: incubator-commonsrdf
Updated Branches:
  refs/heads/rdf4j 5d1d8e2db -> c56e46024


Avoid NPE for contextFilter


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

Branch: refs/heads/rdf4j
Commit: c56e46024e30fcb2b8356147c921147f3c54a836
Parents: 5d1d8e2
Author: Stian Soiland-Reyes <stain@apache.org>
Authored: Mon Jun 20 10:02:11 2016 +0100
Committer: Stian Soiland-Reyes <stain@apache.org>
Committed: Mon Jun 20 10:02:11 2016 +0100

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


http://git-wip-us.apache.org/repos/asf/incubator-commonsrdf/blob/c56e4602/rdf4j/src/main/java/org/apache/commons/rdf/rdf4j/impl/RepositoryGraphImpl.java
----------------------------------------------------------------------
diff --git a/rdf4j/src/main/java/org/apache/commons/rdf/rdf4j/impl/RepositoryGraphImpl.java
b/rdf4j/src/main/java/org/apache/commons/rdf/rdf4j/impl/RepositoryGraphImpl.java
index 73e1065..401f221 100644
--- a/rdf4j/src/main/java/org/apache/commons/rdf/rdf4j/impl/RepositoryGraphImpl.java
+++ b/rdf4j/src/main/java/org/apache/commons/rdf/rdf4j/impl/RepositoryGraphImpl.java
@@ -17,7 +17,6 @@
  */
 package org.apache.commons.rdf.rdf4j.impl;
 
-import java.util.Arrays;
 import java.util.Optional;
 import java.util.stream.Stream;
 
@@ -43,7 +42,8 @@ public class RepositoryGraphImpl extends AbstractRepositoryGraphLike<Triple>
imp
 	public RepositoryGraphImpl(Repository repository, boolean includeInferred, boolean unionGraph)
{
 		super(repository, includeInferred);
 		if (unionGraph) {
-			this.contextFilter = null;
+			// no context filter aka any context
+			this.contextFilter = new Resource[] { };
 		} else {
 			// default context: null
 			this.contextFilter = new Resource[] { null };


Mime
View raw message