jena-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From a...@apache.org
Subject svn commit: r1526440 - /jena/trunk/jena-arq/src/main/java/com/hp/hpl/jena/sparql/core/Substitute.java
Date Thu, 26 Sep 2013 11:00:17 GMT
Author: andy
Date: Thu Sep 26 11:00:17 2013
New Revision: 1526440

URL: http://svn.apache.org/r1526440
Log:
No need to create duplicate PropFuncArg if already a non-variable node.

Modified:
    jena/trunk/jena-arq/src/main/java/com/hp/hpl/jena/sparql/core/Substitute.java

Modified: jena/trunk/jena-arq/src/main/java/com/hp/hpl/jena/sparql/core/Substitute.java
URL: http://svn.apache.org/viewvc/jena/trunk/jena-arq/src/main/java/com/hp/hpl/jena/sparql/core/Substitute.java?rev=1526440&r1=1526439&r2=1526440&view=diff
==============================================================================
--- jena/trunk/jena-arq/src/main/java/com/hp/hpl/jena/sparql/core/Substitute.java (original)
+++ jena/trunk/jena-arq/src/main/java/com/hp/hpl/jena/sparql/core/Substitute.java Thu Sep
26 11:00:17 2013
@@ -127,8 +127,13 @@ public class Substitute
     {
         if ( isNotNeeded(binding) ) return propFuncArg ;
         
-        if ( propFuncArg.isNode() )
+        if ( propFuncArg.isNode() ) {
+            Node n = propFuncArg.getArg() ;
+            if ( ! Var.isVar(n) )
+                // Not a Var, no substitute needed. 
+                return propFuncArg ;
             return new PropFuncArg(substitute(propFuncArg.getArg(), binding)) ;
+        }
         
         List<Node> newArgList = new ArrayList<Node>() ;
         for ( Node n : propFuncArg.getArgList() )
@@ -148,8 +153,6 @@ public class Substitute
         return exprList.copySubstitute(binding) ;  
     }
     
-    
-
     private static boolean isNotNeeded(Binding b)
     {
         return b.isEmpty() ; 



Mime
View raw message