Author: pete.muir(a)jboss.org
Date: 2009-01-29 09:58:35 -0500 (Thu, 29 Jan 2009)
New Revision: 1285
Modified:
ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/bean/AbstractProducerBean.java
Log:
Put the serializability check in the right place!
Modified:
ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/bean/AbstractProducerBean.java
===================================================================
---
ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/bean/AbstractProducerBean.java 2009-01-29
14:40:51 UTC (rev 1284)
+++
ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/bean/AbstractProducerBean.java 2009-01-29
14:58:35 UTC (rev 1285)
@@ -200,11 +200,11 @@
{
return;
}
- if (isDependent() && Beans.isPassivatingBean(injectionPoint.getBean())
&& !isSerializable())
+ if (isDependent() && Beans.isPassivatingBean(injectionPoint.getBean()))
{
if (injectionPoint.getMember() instanceof Field)
{
- if (!Reflections.isTransient(injectionPoint.getMember()))
+ if (!Reflections.isTransient(injectionPoint.getMember()) ||
!isSerializable())
{
throw new IllegalProductException("Dependent scoped producers cannot
produce non-serializable instances for injection into non-transient fields of passivating
beans\n\nProducer: " + this.toString() + "\nInjection Point: " +
injectionPoint.toString());
}
Show replies by date