tapestry-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From hls...@apache.org
Subject git commit: TAP5-2153: @Cache annotation converts thrown checked exceptions into RuntimeExceptions
Date Mon, 04 Nov 2013 21:48:18 GMT
Updated Branches:
  refs/heads/master ab08ddc5d -> 575162981


TAP5-2153: @Cache annotation converts thrown checked exceptions into RuntimeExceptions


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

Branch: refs/heads/master
Commit: 57516298152c924253af5bb5bbb894d571e4e836
Parents: ab08ddc
Author: Howard M. Lewis Ship <hlship@apache.org>
Authored: Mon Nov 4 13:48:11 2013 -0800
Committer: Howard M. Lewis Ship <hlship@apache.org>
Committed: Mon Nov 4 13:48:11 2013 -0800

----------------------------------------------------------------------
 .../org/apache/tapestry5/internal/transform/CachedWorker.java | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/tapestry-5/blob/57516298/tapestry-core/src/main/java/org/apache/tapestry5/internal/transform/CachedWorker.java
----------------------------------------------------------------------
diff --git a/tapestry-core/src/main/java/org/apache/tapestry5/internal/transform/CachedWorker.java
b/tapestry-core/src/main/java/org/apache/tapestry5/internal/transform/CachedWorker.java
index cdd5392..e5eae27 100644
--- a/tapestry-core/src/main/java/org/apache/tapestry5/internal/transform/CachedWorker.java
+++ b/tapestry-core/src/main/java/org/apache/tapestry5/internal/transform/CachedWorker.java
@@ -182,9 +182,10 @@ public class CachedWorker implements ComponentClassTransformWorker2
 
                 invocation.proceed();
 
-                invocation.rethrow();
-
-                cache.set(invocation.getReturnValue());
+                if(!invocation.didThrowCheckedException())
+                {
+                    cache.set(invocation.getReturnValue());
+                }
             }
 
             private MethodResultCache getOrCreateCache(MethodInvocation invocation)


Mime
View raw message