Author: rmannibucau
Date: Sat Oct 11 17:51:48 2014
New Revision: 1631094

URL: http://svn.apache.org/r1631094
Log:
this  field shouldn't be serialized but it can since it is in AppInfo through 
PersistenceUnitInfo#properties so ensureing we don't break everything

Modified:
    
tomee/tomee/trunk/container/openejb-core/src/main/java/org/apache/openejb/assembler/classic/ValidatorFactoryWrapper.java

Modified: 
tomee/tomee/trunk/container/openejb-core/src/main/java/org/apache/openejb/assembler/classic/ValidatorFactoryWrapper.java
URL: 
http://svn.apache.org/viewvc/tomee/tomee/trunk/container/openejb-core/src/main/java/org/apache/openejb/assembler/classic/ValidatorFactoryWrapper.java?rev=1631094&r1=1631093&r2=1631094&view=diff
==============================================================================
--- 
tomee/tomee/trunk/container/openejb-core/src/main/java/org/apache/openejb/assembler/classic/ValidatorFactoryWrapper.java
 (original)
+++ 
tomee/tomee/trunk/container/openejb-core/src/main/java/org/apache/openejb/assembler/classic/ValidatorFactoryWrapper.java
 Sat Oct 11 17:51:48 2014
@@ -35,13 +35,13 @@ import java.util.Map;
 public class ValidatorFactoryWrapper implements ValidatorFactory, Serializable 
{
     public static final Logger logger = 
Logger.getInstance(LogCategory.OPENEJB, ValidatorFactoryWrapper.class);
 
-    private final Map<ComparableValidationConfig, ValidatorFactory> 
fallbackValidators;
+    private transient final Map<ComparableValidationConfig, ValidatorFactory> 
fallbackValidators;
 
     private ValidatorFactory factory() {
         try {
             return ValidatorUtil.lookupFactory();
         } catch (final NamingException e) { // in absolute we should sort them 
to get the closest one of the persistence-unit?
-            if (!fallbackValidators.isEmpty()) {
+            if (fallbackValidators != null && !fallbackValidators.isEmpty()) {
                 return fallbackValidators.values().iterator().next();
             }
             return ValidatorUtil.tryJndiLaterFactory();


Reply via email to