You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tapestry.apache.org by hl...@apache.org on 2013/11/04 22:48:18 UTC

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

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 <hl...@apache.org>
Authored: Mon Nov 4 13:48:11 2013 -0800
Committer: Howard M. Lewis Ship <hl...@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)