/*X TODO see spec issue CDI-140 */
if(dependentProducer)
{
if(injected != null && !Serializable.class.isAssignableFrom(injected.getClass()))
{
throw new IllegalProductException("A producer method or field of scope @Dependent returns an unserializable object for injection " +
"into an injection point "+ injectionPoint +" that requires a passivation capable dependency");
}
}
return injected;