jena-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From a...@apache.org
Subject [7/8] jena git commit: Use a constant
Date Thu, 21 Apr 2016 20:41:34 GMT
Use a constant


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

Branch: refs/heads/master
Commit: 20703b0559fc338c2e2a9a81de0254e942cb227f
Parents: fbf48b2
Author: Andy Seaborne <andy@apache.org>
Authored: Tue Apr 19 21:55:23 2016 +0100
Committer: Andy Seaborne <andy@apache.org>
Committed: Tue Apr 19 21:55:23 2016 +0100

----------------------------------------------------------------------
 .../src/main/java/org/apache/jena/riot/system/RiotLib.java     | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/jena/blob/20703b05/jena-arq/src/main/java/org/apache/jena/riot/system/RiotLib.java
----------------------------------------------------------------------
diff --git a/jena-arq/src/main/java/org/apache/jena/riot/system/RiotLib.java b/jena-arq/src/main/java/org/apache/jena/riot/system/RiotLib.java
index cde6a91..8f1e893 100644
--- a/jena-arq/src/main/java/org/apache/jena/riot/system/RiotLib.java
+++ b/jena-arq/src/main/java/org/apache/jena/riot/system/RiotLib.java
@@ -83,12 +83,14 @@ public class RiotLib
         return skolomizedBNodes && iri.startsWith(bNodeLabelStart) ;
     }
     
+    private static final String URI_PREFIX_FIXUP = "::";
+    
     // These two must be in-step.
     /** Function applied to undefined prefixes to convert to a URI string */  
-    public static final Function<String,String> fixupPrefixes      = (x) -> "::"+x
;
+    public static final Function<String,String> fixupPrefixes      = (x) -> URI_PREFIX_FIXUP.concat(x)
;
 
     /** Function to test for undefined prefix URIs*/  
-    public static final Predicate<String> testFixupedPrefixURI     = (x) -> x.startsWith("::")
;
+    public static final Predicate<String> testFixupedPrefixURI     = (x) -> x.startsWith(URI_PREFIX_FIXUP)
;
     
     /** Test whether a IRI is a ARQ-encoded blank node. */
     public static boolean isPrefixIRI(String iri) {


Mime
View raw message