Skip to content

Commit

Permalink
Put the serializability check in the right place!
Browse files Browse the repository at this point in the history
git-svn-id: http://anonsvn.jboss.org/repos/weld/ri/trunk@1285 1c488680-804c-0410-94cd-c6b725194a0e
  • Loading branch information
pmuir committed Jan 29, 2009
1 parent 1bc2327 commit f688096
Showing 1 changed file with 2 additions and 2 deletions.
Expand Up @@ -200,11 +200,11 @@ protected void checkReturnValue(T instance)
{
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());
}
Expand Down

0 comments on commit f688096

Please sign in to comment.