openwebbeans-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From strub...@apache.org
Subject svn commit: r1752325 - /openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/intercept/NormalScopedBeanInterceptorHandler.java
Date Tue, 12 Jul 2016 18:36:20 GMT
Author: struberg
Date: Tue Jul 12 18:36:20 2016
New Revision: 1752325

URL: http://svn.apache.org/viewvc?rev=1752325&view=rev
Log:
OWB-1123 improve error reporting for serialisation issues of beans 

Modified:
    openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/intercept/NormalScopedBeanInterceptorHandler.java

Modified: openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/intercept/NormalScopedBeanInterceptorHandler.java
URL: http://svn.apache.org/viewvc/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/intercept/NormalScopedBeanInterceptorHandler.java?rev=1752325&r1=1752324&r2=1752325&view=diff
==============================================================================
--- openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/intercept/NormalScopedBeanInterceptorHandler.java
(original)
+++ openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/intercept/NormalScopedBeanInterceptorHandler.java
Tue Jul 12 18:36:20 2016
@@ -25,6 +25,7 @@ import javax.enterprise.inject.spi.Bean;
 import javax.enterprise.inject.spi.BeanManager;
 import javax.enterprise.inject.spi.PassivationCapable;
 import javax.inject.Provider;
+import java.io.NotSerializableException;
 import java.io.ObjectStreamException;
 import java.io.Serializable;
 
@@ -121,6 +122,10 @@ public class NormalScopedBeanInterceptor
         WebBeansContext webBeansContext = WebBeansContext.getInstance();
         beanManager = webBeansContext.getBeanManagerImpl();
         bean = beanManager.getPassivationCapableBean(beanPassivationId);
+        if (bean == null)
+        {
+            throw new NotSerializableException("Failure during de-serialisation: Cannot load
Bean with passivationId " + beanPassivationId);
+        }
 
         return webBeansContext.getNormalScopeProxyFactory().createNormalScopeProxy(bean);
     }



Mime
View raw message