aries-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cschnei...@apache.org
Subject svn commit: r1695097 - /aries/trunk/jpa/jpa-blueprint/src/main/java/org/apache/aries/jpa/blueprint/impl/JpaInterceptor.java
Date Mon, 10 Aug 2015 14:50:27 GMT
Author: cschneider
Date: Mon Aug 10 14:50:26 2015
New Revision: 1695097

URL: http://svn.apache.org/r1695097
Log:
[ARIES-1372] Avoid NPE

Modified:
    aries/trunk/jpa/jpa-blueprint/src/main/java/org/apache/aries/jpa/blueprint/impl/JpaInterceptor.java

Modified: aries/trunk/jpa/jpa-blueprint/src/main/java/org/apache/aries/jpa/blueprint/impl/JpaInterceptor.java
URL: http://svn.apache.org/viewvc/aries/trunk/jpa/jpa-blueprint/src/main/java/org/apache/aries/jpa/blueprint/impl/JpaInterceptor.java?rev=1695097&r1=1695096&r2=1695097&view=diff
==============================================================================
--- aries/trunk/jpa/jpa-blueprint/src/main/java/org/apache/aries/jpa/blueprint/impl/JpaInterceptor.java
(original)
+++ aries/trunk/jpa/jpa-blueprint/src/main/java/org/apache/aries/jpa/blueprint/impl/JpaInterceptor.java
Mon Aug 10 14:50:26 2015
@@ -65,13 +65,17 @@ public class JpaInterceptor implements I
 
     public void postCallWithException(ComponentMetadata cm, Method m, Throwable ex, Object
preCallToken) {
         LOG.debug("PostCallWithException for bean {}, method {}", cm.getId(), m.getName(),
ex);
-        ((Coordination) preCallToken).fail(ex);
+        if (preCallToken != null) {
+            ((Coordination) preCallToken).fail(ex);
+        }
     }
 
     public void postCallWithReturn(ComponentMetadata cm, Method m, Object returnType, Object
preCallToken)
         throws Exception {
         LOG.debug("PostCallWithReturn for bean {}, method {}", cm.getId(), m.getName());
-        ((Coordination) preCallToken).end();
+        if (preCallToken != null) {
+            ((Coordination) preCallToken).end();
+        }
     }
 
 



Mime
View raw message