jena-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From a...@apache.org
Subject [02/10] jena git commit: JENA-1051: Use Java8 lambdas.
Date Wed, 21 Oct 2015 16:46:21 GMT
JENA-1051: Use Java8 lambdas.


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

Branch: refs/heads/master
Commit: ebc14ed72f2bb0a0e22a21e2463575db3d914a0c
Parents: 53c258f
Author: Andy Seaborne <andy@apache.org>
Authored: Wed Oct 21 13:06:45 2015 +0100
Committer: Andy Seaborne <andy@apache.org>
Committed: Wed Oct 21 17:44:05 2015 +0100

----------------------------------------------------------------------
 .../org/apache/jena/riot/system/IRIResolver.java     | 15 +++------------
 1 file changed, 3 insertions(+), 12 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/jena/blob/ebc14ed7/jena-arq/src/main/java/org/apache/jena/riot/system/IRIResolver.java
----------------------------------------------------------------------
diff --git a/jena-arq/src/main/java/org/apache/jena/riot/system/IRIResolver.java b/jena-arq/src/main/java/org/apache/jena/riot/system/IRIResolver.java
index a4a1433..e7d18b9 100644
--- a/jena-arq/src/main/java/org/apache/jena/riot/system/IRIResolver.java
+++ b/jena-arq/src/main/java/org/apache/jena/riot/system/IRIResolver.java
@@ -341,12 +341,7 @@ public abstract class IRIResolver
         public IRI resolveSilent(final String uriStr) {
             if ( resolvedIRIs == null ) 
                 return iriFactory.create(uriStr) ;
-            Callable<IRI> filler = new Callable<IRI>() {
-                @Override
-                public IRI call() throws Exception {
-                    return iriFactory.create(uriStr) ;
-                }
-            } ;
+            Callable<IRI> filler = () -> iriFactory.create(uriStr) ;
             IRI iri = resolvedIRIs.getOrFill(uriStr, filler) ;
             return iri ;
         }
@@ -432,12 +427,8 @@ public abstract class IRIResolver
         public IRI resolveSilent(final String relURI) {
             if ( resolvedIRIs == null ) 
                 return iriFactory.create(relURI) ;
-            Callable<IRI> filler = new Callable<IRI>() {
-                @Override
-                public IRI call() throws Exception {
-                    return base.create(relURI) ;
-                }
-            } ;
+            IRI x = IRIResolver.iriFactory.create(relURI) ;
+            Callable<IRI> filler = () -> base.create(x) ;
             return resolvedIRIs.getOrFill(relURI, filler) ;
         }
     }


Mime
View raw message