jena-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From a...@apache.org
Subject [1/5] jena git commit: Make Cache0.getOrFill always calculate and return the value.
Date Sat, 19 Aug 2017 17:00:39 GMT
Repository: jena
Updated Branches:
  refs/heads/master 0f9abc6e9 -> 38157ff48


Make Cache0.getOrFill always calculate and return the value.

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

Branch: refs/heads/master
Commit: 1be131e2215bed502bc4935fdc4fc163dc158746
Parents: 0f9abc6
Author: Andy Seaborne <andy@apache.org>
Authored: Thu Aug 17 21:04:20 2017 +0100
Committer: Andy Seaborne <andy@apache.org>
Committed: Thu Aug 17 21:04:20 2017 +0100

----------------------------------------------------------------------
 .../main/java/org/apache/jena/atlas/lib/cache/Cache0.java    | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/jena/blob/1be131e2/jena-base/src/main/java/org/apache/jena/atlas/lib/cache/Cache0.java
----------------------------------------------------------------------
diff --git a/jena-base/src/main/java/org/apache/jena/atlas/lib/cache/Cache0.java b/jena-base/src/main/java/org/apache/jena/atlas/lib/cache/Cache0.java
index 5b8b5cc..e550462 100644
--- a/jena-base/src/main/java/org/apache/jena/atlas/lib/cache/Cache0.java
+++ b/jena-base/src/main/java/org/apache/jena/atlas/lib/cache/Cache0.java
@@ -39,7 +39,13 @@ public final class Cache0<K, V> implements Cache<K, V> {
 
     @Override
     public V getOrFill(K key, Callable<V> callable) {
-        return null ;
+        try {
+            return callable.call() ;
+        }
+        catch (Exception e) {
+            e.printStackTrace();
+            return null;
+        }
     }
 
     @Override


Mime
View raw message