jena-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From a...@apache.org
Subject jena git commit: Ensure Expr.NONE is handled (querybuilder case).
Date Wed, 16 Nov 2016 12:20:05 GMT
Repository: jena
Updated Branches:
  refs/heads/master dac2e8c71 -> 0ced905fb


Ensure Expr.NONE is handled (querybuilder case).


Project: http://git-wip-us.apache.org/repos/asf/jena/repo
Commit: http://git-wip-us.apache.org/repos/asf/jena/commit/0ced905f
Tree: http://git-wip-us.apache.org/repos/asf/jena/tree/0ced905f
Diff: http://git-wip-us.apache.org/repos/asf/jena/diff/0ced905f

Branch: refs/heads/master
Commit: 0ced905fb516f27a34aac675909cbd7ef52baa2e
Parents: dac2e8c
Author: Andy Seaborne <andy@apache.org>
Authored: Wed Nov 16 12:19:26 2016 +0000
Committer: Andy Seaborne <andy@apache.org>
Committed: Wed Nov 16 12:19:26 2016 +0000

----------------------------------------------------------------------
 .../jena/arq/querybuilder/rewriters/ExprRewriter.java       | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/jena/blob/0ced905f/jena-extras/jena-querybuilder/src/main/java/org/apache/jena/arq/querybuilder/rewriters/ExprRewriter.java
----------------------------------------------------------------------
diff --git a/jena-extras/jena-querybuilder/src/main/java/org/apache/jena/arq/querybuilder/rewriters/ExprRewriter.java
b/jena-extras/jena-querybuilder/src/main/java/org/apache/jena/arq/querybuilder/rewriters/ExprRewriter.java
index d928cf3..f96c7ec 100644
--- a/jena-extras/jena-querybuilder/src/main/java/org/apache/jena/arq/querybuilder/rewriters/ExprRewriter.java
+++ b/jena-extras/jena-querybuilder/src/main/java/org/apache/jena/arq/querybuilder/rewriters/ExprRewriter.java
@@ -24,6 +24,7 @@ import java.util.ArrayList;
 import java.util.List;
 import java.util.Map;
 
+import org.apache.jena.atlas.lib.InternalErrorException;
 import org.apache.jena.graph.Node ;
 import org.apache.jena.query.SortCondition ;
 import org.apache.jena.sparql.algebra.Op ;
@@ -127,7 +128,13 @@ public class ExprRewriter extends AbstractRewriter<Expr> implements
ExprVisitor
 		push(rewriter.pop());
 	}
 
-	@Override
+    @Override
+    public void visit(ExprNone none) {
+        // This should not occur.
+        throw new InternalErrorException("Visit Expr.NONE");
+    }
+
+    @Override
 	public void visit(ExprVar nv) {
 		Node n = changeNode(nv.asVar());
 		if (n.isVariable()) {


Mime
View raw message