You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commonsrdf.apache.org by st...@apache.org on 2016/06/20 09:02:23 UTC

incubator-commonsrdf git commit: Avoid NPE for contextFilter

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 <st...@apache.org>
Authored: Mon Jun 20 10:02:11 2016 +0100
Committer: Stian Soiland-Reyes <st...@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 };