myfaces-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gpetra...@apache.org
Subject svn commit: r986304 - in /myfaces/extensions/validator/branches/branch_for_jsf_1_1: core/src/main/java/org/apache/myfaces/extensions/validator/core/el/ core/src/main/java/org/apache/myfaces/extensions/validator/core/interceptor/ core/src/main/java/org/...
Date Tue, 17 Aug 2010 13:31:09 GMT
Author: gpetracek
Date: Tue Aug 17 13:31:09 2010
New Revision: 986304

URL: http://svn.apache.org/viewvc?rev=986304&view=rev
Log:
EXTVAL-80 optimized el-helper usage

Modified:
    myfaces/extensions/validator/branches/branch_for_jsf_1_1/core/src/main/java/org/apache/myfaces/extensions/validator/core/el/ValueBindingExpression.java
    myfaces/extensions/validator/branches/branch_for_jsf_1_1/core/src/main/java/org/apache/myfaces/extensions/validator/core/interceptor/AbstractValidationInterceptor.java
    myfaces/extensions/validator/branches/branch_for_jsf_1_1/core/src/main/java/org/apache/myfaces/extensions/validator/core/validation/message/resolver/AbstractValidationErrorMessageResolver.java
    myfaces/extensions/validator/branches/branch_for_jsf_1_1/validation-modules/bean-validation/src/main/java/org/apache/myfaces/extensions/validator/beanval/util/BeanValidationUtils.java
    myfaces/extensions/validator/branches/branch_for_jsf_1_1/validation-modules/bean-validation/src/main/java/org/apache/myfaces/extensions/validator/beanval/util/ExtValBeanValidationMetaDataInternals.java
    myfaces/extensions/validator/branches/branch_for_jsf_1_1/validation-modules/bean-validation/src/main/java/org/apache/myfaces/extensions/validator/beanval/validation/ModelValidationPhaseListener.java
    myfaces/extensions/validator/branches/branch_for_jsf_1_1/validation-modules/property-validation/src/main/java/org/apache/myfaces/extensions/validator/MappedConstraintSourcePropertyValidationModuleValidationInterceptor.java
    myfaces/extensions/validator/branches/branch_for_jsf_1_1/validation-modules/property-validation/src/main/java/org/apache/myfaces/extensions/validator/baseval/strategy/SkipValidationStrategy.java
    myfaces/extensions/validator/branches/branch_for_jsf_1_1/validation-modules/property-validation/src/main/java/org/apache/myfaces/extensions/validator/crossval/recorder/CrossValidationUserInputRecorder.java
    myfaces/extensions/validator/branches/branch_for_jsf_1_1/validation-modules/property-validation/src/main/java/org/apache/myfaces/extensions/validator/crossval/strategy/ELCompareStrategy.java

Modified: myfaces/extensions/validator/branches/branch_for_jsf_1_1/core/src/main/java/org/apache/myfaces/extensions/validator/core/el/ValueBindingExpression.java
URL: http://svn.apache.org/viewvc/myfaces/extensions/validator/branches/branch_for_jsf_1_1/core/src/main/java/org/apache/myfaces/extensions/validator/core/el/ValueBindingExpression.java?rev=986304&r1=986303&r2=986304&view=diff
==============================================================================
--- myfaces/extensions/validator/branches/branch_for_jsf_1_1/core/src/main/java/org/apache/myfaces/extensions/validator/core/el/ValueBindingExpression.java
(original)
+++ myfaces/extensions/validator/branches/branch_for_jsf_1_1/core/src/main/java/org/apache/myfaces/extensions/validator/core/el/ValueBindingExpression.java
Tue Aug 17 13:31:09 2010
@@ -37,6 +37,8 @@ public class ValueBindingExpression
     private String prefix;
     private String token;
 
+    private static final ELHelper EL_HELPER = ExtValUtils.getELHelper();
+
     public static ValueBindingExpression replaceOrAddProperty(ValueBindingExpression valueBindingExpression,
                                                               String newProperty)
     {
@@ -87,7 +89,7 @@ public class ValueBindingExpression
 
     public ValueBindingExpression(String expression)
     {
-        if(!ExtValUtils.getELHelper().isELTermWellFormed(expression))
+        if(!EL_HELPER.isELTermWellFormed(expression))
         {
             throw new IllegalStateException(expression + " is no valid el-expression");
         }

Modified: myfaces/extensions/validator/branches/branch_for_jsf_1_1/core/src/main/java/org/apache/myfaces/extensions/validator/core/interceptor/AbstractValidationInterceptor.java
URL: http://svn.apache.org/viewvc/myfaces/extensions/validator/branches/branch_for_jsf_1_1/core/src/main/java/org/apache/myfaces/extensions/validator/core/interceptor/AbstractValidationInterceptor.java?rev=986304&r1=986303&r2=986304&view=diff
==============================================================================
--- myfaces/extensions/validator/branches/branch_for_jsf_1_1/core/src/main/java/org/apache/myfaces/extensions/validator/core/interceptor/AbstractValidationInterceptor.java
(original)
+++ myfaces/extensions/validator/branches/branch_for_jsf_1_1/core/src/main/java/org/apache/myfaces/extensions/validator/core/interceptor/AbstractValidationInterceptor.java
Tue Aug 17 13:31:09 2010
@@ -18,6 +18,7 @@
  */
 package org.apache.myfaces.extensions.validator.core.interceptor;
 
+import org.apache.myfaces.extensions.validator.core.el.ELHelper;
 import org.apache.myfaces.extensions.validator.internal.UsageCategory;
 import org.apache.myfaces.extensions.validator.internal.UsageInformation;
 import org.apache.myfaces.extensions.validator.core.ExtValContext;
@@ -52,6 +53,8 @@ import java.util.logging.Level;
 @UsageInformation(UsageCategory.REUSE)
 public abstract class AbstractValidationInterceptor extends AbstractRendererInterceptor
 {
+    private ELHelper elHelper;
+
     protected boolean isRequiredInitializationSupported()
     {
         return false;
@@ -240,11 +243,20 @@ public abstract class AbstractValidation
         return uiComponent instanceof EditableValueHolder && isValueBindingOfComponentValid(uiComponent);
     }
 
+    protected ELHelper getELHelper()
+    {
+        if(this.elHelper == null)
+        {
+            this.elHelper = ExtValUtils.getELHelper();
+        }
+        return this.elHelper;
+    }
+
     private boolean isValueBindingOfComponentValid(UIComponent uiComponent)
     {
         try
         {
-            return ExtValUtils.getELHelper().getPropertyDetailsOfValueBinding(uiComponent)
!= null;
+            return getELHelper().getPropertyDetailsOfValueBinding(uiComponent) != null;
         }
         catch (Exception e)
         {

Modified: myfaces/extensions/validator/branches/branch_for_jsf_1_1/core/src/main/java/org/apache/myfaces/extensions/validator/core/validation/message/resolver/AbstractValidationErrorMessageResolver.java
URL: http://svn.apache.org/viewvc/myfaces/extensions/validator/branches/branch_for_jsf_1_1/core/src/main/java/org/apache/myfaces/extensions/validator/core/validation/message/resolver/AbstractValidationErrorMessageResolver.java?rev=986304&r1=986303&r2=986304&view=diff
==============================================================================
--- myfaces/extensions/validator/branches/branch_for_jsf_1_1/core/src/main/java/org/apache/myfaces/extensions/validator/core/validation/message/resolver/AbstractValidationErrorMessageResolver.java
(original)
+++ myfaces/extensions/validator/branches/branch_for_jsf_1_1/core/src/main/java/org/apache/myfaces/extensions/validator/core/validation/message/resolver/AbstractValidationErrorMessageResolver.java
Tue Aug 17 13:31:09 2010
@@ -21,6 +21,7 @@ package org.apache.myfaces.extensions.va
 import org.apache.myfaces.extensions.validator.core.ExtValContext;
 import org.apache.myfaces.extensions.validator.core.CustomInformation;
 import org.apache.myfaces.extensions.validator.core.ExtValCoreConfiguration;
+import org.apache.myfaces.extensions.validator.core.el.ELHelper;
 import org.apache.myfaces.extensions.validator.internal.UsageInformation;
 import org.apache.myfaces.extensions.validator.internal.UsageCategory;
 import org.apache.myfaces.extensions.validator.util.ExtValUtils;
@@ -52,6 +53,8 @@ public abstract class AbstractValidation
     //with jsf 1.1 only available if there is a custom bean
     private String messageBundleVarName;
 
+    private ELHelper elHelper = ExtValUtils.getELHelper();
+
     protected AbstractValidationErrorMessageResolver()
     {
         logger.fine(getClass().getName() + " instantiated");
@@ -145,7 +148,7 @@ public abstract class AbstractValidation
         //only in case of a ValidationErrorMessageResolver which is configured as bean
         if (this.messageBundleVarName != null && customMessage == null)
         {
-            resourceBundle = (ResourceBundle) ExtValUtils.getELHelper().getBean(messageBundleVarName);
+            resourceBundle = (ResourceBundle) this.elHelper.getBean(messageBundleVarName);
 
             if (resourceBundle != null)
             {

Modified: myfaces/extensions/validator/branches/branch_for_jsf_1_1/validation-modules/bean-validation/src/main/java/org/apache/myfaces/extensions/validator/beanval/util/BeanValidationUtils.java
URL: http://svn.apache.org/viewvc/myfaces/extensions/validator/branches/branch_for_jsf_1_1/validation-modules/bean-validation/src/main/java/org/apache/myfaces/extensions/validator/beanval/util/BeanValidationUtils.java?rev=986304&r1=986303&r2=986304&view=diff
==============================================================================
--- myfaces/extensions/validator/branches/branch_for_jsf_1_1/validation-modules/bean-validation/src/main/java/org/apache/myfaces/extensions/validator/beanval/util/BeanValidationUtils.java
(original)
+++ myfaces/extensions/validator/branches/branch_for_jsf_1_1/validation-modules/bean-validation/src/main/java/org/apache/myfaces/extensions/validator/beanval/util/BeanValidationUtils.java
Tue Aug 17 13:31:09 2010
@@ -20,6 +20,7 @@ package org.apache.myfaces.extensions.va
 
 import org.apache.myfaces.extensions.validator.beanval.storage.ModelValidationEntry;
 import org.apache.myfaces.extensions.validator.beanval.ExtValBeanValidationContext;
+import org.apache.myfaces.extensions.validator.core.el.ELHelper;
 import org.apache.myfaces.extensions.validator.core.property.PropertyDetails;
 import org.apache.myfaces.extensions.validator.core.validation.message.FacesMessageHolder;
 import org.apache.myfaces.extensions.validator.internal.UsageCategory;
@@ -51,7 +52,11 @@ import java.util.logging.Logger;
 public class BeanValidationUtils
 {
     private static final Logger LOGGER = Logger.getLogger(BeanValidationUtils.class.getName());
-    private static ExtValBeanValidationMetaDataInternals bvmi = new ExtValBeanValidationMetaDataInternals(LOGGER);
+    private static ELHelper elHelper = ExtValUtils.getELHelper();
+
+    private static ExtValBeanValidationMetaDataInternals bvmi =
+            new ExtValBeanValidationMetaDataInternals(LOGGER, elHelper);
+
     private static final String VALIDATOR_FACTORY_KEY = "javax.faces.validator.beanValidator.ValidatorFactory";
 
     @SuppressWarnings({"unchecked"})
@@ -111,7 +116,7 @@ public class BeanValidationUtils
     {
         String[] key = propertyDetails.getKey().split("\\.");
 
-        Object firstBean = ExtValUtils.getELHelper().getBean(key[0]);
+        Object firstBean = elHelper.getBean(key[0]);
 
         List<Class> foundGroupsForPropertyValidation = new ArrayList<Class>();
         List<Class> restrictedGroupsForPropertyValidation = new ArrayList<Class>();

Modified: myfaces/extensions/validator/branches/branch_for_jsf_1_1/validation-modules/bean-validation/src/main/java/org/apache/myfaces/extensions/validator/beanval/util/ExtValBeanValidationMetaDataInternals.java
URL: http://svn.apache.org/viewvc/myfaces/extensions/validator/branches/branch_for_jsf_1_1/validation-modules/bean-validation/src/main/java/org/apache/myfaces/extensions/validator/beanval/util/ExtValBeanValidationMetaDataInternals.java?rev=986304&r1=986303&r2=986304&view=diff
==============================================================================
--- myfaces/extensions/validator/branches/branch_for_jsf_1_1/validation-modules/bean-validation/src/main/java/org/apache/myfaces/extensions/validator/beanval/util/ExtValBeanValidationMetaDataInternals.java
(original)
+++ myfaces/extensions/validator/branches/branch_for_jsf_1_1/validation-modules/bean-validation/src/main/java/org/apache/myfaces/extensions/validator/beanval/util/ExtValBeanValidationMetaDataInternals.java
Tue Aug 17 13:31:09 2010
@@ -59,10 +59,12 @@ class ExtValBeanValidationMetaDataIntern
 {
     private Logger logger;
     private LabeledMessageInternals labeledMessageInternals = new LabeledMessageInternals();
+    private ELHelper elHelper;
 
-    ExtValBeanValidationMetaDataInternals(Logger logger)
+    ExtValBeanValidationMetaDataInternals(Logger logger, ELHelper elHelper)
     {
         this.logger = logger;
+        this.elHelper = elHelper;
     }
 
     void extractExtValBeanValidationMetaData(PropertyDetails propertyDetails,
@@ -500,8 +502,6 @@ class ExtValBeanValidationMetaDataIntern
 
     private boolean isValidationPermitted(BeanValidation beanValidation)
     {
-        ELHelper elHelper = ExtValUtils.getELHelper();
-
         FacesContext facesContext = FacesContext.getCurrentInstance();
         for (String condition : beanValidation.conditions())
         {
@@ -570,8 +570,7 @@ class ExtValBeanValidationMetaDataIntern
     private Object tryToResolveValidationTargetExpression(String validationTargetExpression)
     {
         ValueBindingExpression valueBindingExpression = new ValueBindingExpression(validationTargetExpression);
-        return ExtValUtils.getELHelper()
-                .getValueOfExpression(FacesContext.getCurrentInstance(), valueBindingExpression);
+        return this.elHelper.getValueOfExpression(FacesContext.getCurrentInstance(), valueBindingExpression);
     }
 
     private void processGroups(BeanValidation beanValidation,

Modified: myfaces/extensions/validator/branches/branch_for_jsf_1_1/validation-modules/bean-validation/src/main/java/org/apache/myfaces/extensions/validator/beanval/validation/ModelValidationPhaseListener.java
URL: http://svn.apache.org/viewvc/myfaces/extensions/validator/branches/branch_for_jsf_1_1/validation-modules/bean-validation/src/main/java/org/apache/myfaces/extensions/validator/beanval/validation/ModelValidationPhaseListener.java?rev=986304&r1=986303&r2=986304&view=diff
==============================================================================
--- myfaces/extensions/validator/branches/branch_for_jsf_1_1/validation-modules/bean-validation/src/main/java/org/apache/myfaces/extensions/validator/beanval/validation/ModelValidationPhaseListener.java
(original)
+++ myfaces/extensions/validator/branches/branch_for_jsf_1_1/validation-modules/bean-validation/src/main/java/org/apache/myfaces/extensions/validator/beanval/validation/ModelValidationPhaseListener.java
Tue Aug 17 13:31:09 2010
@@ -23,6 +23,7 @@ import org.apache.myfaces.extensions.val
 import org.apache.myfaces.extensions.validator.beanval.annotation.ModelValidation;
 import org.apache.myfaces.extensions.validator.beanval.storage.ModelValidationEntry;
 import org.apache.myfaces.extensions.validator.beanval.util.BeanValidationUtils;
+import org.apache.myfaces.extensions.validator.core.el.ELHelper;
 import org.apache.myfaces.extensions.validator.core.property.DefaultPropertyInformation;
 import org.apache.myfaces.extensions.validator.core.property.PropertyDetails;
 import org.apache.myfaces.extensions.validator.core.property.PropertyInformation;
@@ -98,9 +99,11 @@ public class ModelValidationPhaseListene
         Set<ConstraintViolation<Object>> violations;
         Class[] groupsToValidate;
 
+        ELHelper elHelper = ExtValUtils.getELHelper();
+
         for (Object validationTarget : modelValidationEntry.getValidationTargets())
         {
-            propertyInformation = createPropertyInformation(modelValidationEntry, validationTarget);
+            propertyInformation = createPropertyInformation(modelValidationEntry, validationTarget,
elHelper);
 
             if (!executeGlobalBeforeValidationInterceptors(
                     facesContext, modelValidationEntry.getComponent(), validationTarget,
propertyInformation))
@@ -184,15 +187,14 @@ public class ModelValidationPhaseListene
     }
 
     private PropertyInformation createPropertyInformation(
-            ModelValidationEntry modelValidationEntry, Object validationTarget)
+            ModelValidationEntry modelValidationEntry, Object validationTarget, ELHelper
elHelper)
     {
         PropertyInformation propertyInformation;
         PropertyDetails propertyDetails;
         propertyInformation = new DefaultPropertyInformation();
         if (modelValidationEntry.getComponent() != null)
         {
-            propertyDetails = ExtValUtils.getELHelper()
-                    .getPropertyDetailsOfValueBinding(modelValidationEntry.getComponent());
+            propertyDetails = elHelper.getPropertyDetailsOfValueBinding(modelValidationEntry.getComponent());
         }
         else
         {

Modified: myfaces/extensions/validator/branches/branch_for_jsf_1_1/validation-modules/property-validation/src/main/java/org/apache/myfaces/extensions/validator/MappedConstraintSourcePropertyValidationModuleValidationInterceptor.java
URL: http://svn.apache.org/viewvc/myfaces/extensions/validator/branches/branch_for_jsf_1_1/validation-modules/property-validation/src/main/java/org/apache/myfaces/extensions/validator/MappedConstraintSourcePropertyValidationModuleValidationInterceptor.java?rev=986304&r1=986303&r2=986304&view=diff
==============================================================================
--- myfaces/extensions/validator/branches/branch_for_jsf_1_1/validation-modules/property-validation/src/main/java/org/apache/myfaces/extensions/validator/MappedConstraintSourcePropertyValidationModuleValidationInterceptor.java
(original)
+++ myfaces/extensions/validator/branches/branch_for_jsf_1_1/validation-modules/property-validation/src/main/java/org/apache/myfaces/extensions/validator/MappedConstraintSourcePropertyValidationModuleValidationInterceptor.java
Tue Aug 17 13:31:09 2010
@@ -43,8 +43,7 @@ public class MappedConstraintSourcePrope
     @Override
     protected Map<String, Object> getTransformedMetaDataFor(FacesContext facesContext,
UIComponent uiComponent)
     {
-        PropertyDetails originalPropertyDetail = ExtValUtils.getELHelper()
-                .getPropertyDetailsOfValueBinding(uiComponent);
+        PropertyDetails originalPropertyDetail = getELHelper().getPropertyDetailsOfValueBinding(uiComponent);
 
         PropertyInformation propertyInformation = extractFromMappedConstraintSource(originalPropertyDetail);
 

Modified: myfaces/extensions/validator/branches/branch_for_jsf_1_1/validation-modules/property-validation/src/main/java/org/apache/myfaces/extensions/validator/baseval/strategy/SkipValidationStrategy.java
URL: http://svn.apache.org/viewvc/myfaces/extensions/validator/branches/branch_for_jsf_1_1/validation-modules/property-validation/src/main/java/org/apache/myfaces/extensions/validator/baseval/strategy/SkipValidationStrategy.java?rev=986304&r1=986303&r2=986304&view=diff
==============================================================================
--- myfaces/extensions/validator/branches/branch_for_jsf_1_1/validation-modules/property-validation/src/main/java/org/apache/myfaces/extensions/validator/baseval/strategy/SkipValidationStrategy.java
(original)
+++ myfaces/extensions/validator/branches/branch_for_jsf_1_1/validation-modules/property-validation/src/main/java/org/apache/myfaces/extensions/validator/baseval/strategy/SkipValidationStrategy.java
Tue Aug 17 13:31:09 2010
@@ -19,6 +19,7 @@
 package org.apache.myfaces.extensions.validator.baseval.strategy;
 
 import org.apache.myfaces.extensions.validator.baseval.annotation.SkipValidation;
+import org.apache.myfaces.extensions.validator.core.el.ELHelper;
 import org.apache.myfaces.extensions.validator.core.property.PropertyInformationKeys;
 import org.apache.myfaces.extensions.validator.core.metadata.MetaDataEntry;
 import org.apache.myfaces.extensions.validator.core.validation.strategy.ValidationStrategy;
@@ -49,9 +50,10 @@ public class SkipValidationStrategy impl
     {
         String[] valueBindingExpressions = metaDataEntry.getValue(SkipValidation.class).value();
 
+        ELHelper elHelper = ExtValUtils.getELHelper();
         for(String valueBindingExpression : valueBindingExpressions)
         {
-            if(Boolean.TRUE.equals(ExtValUtils.getELHelper().getValueOfExpression(
+            if(Boolean.TRUE.equals(elHelper.getValueOfExpression(
                 facesContext, new ValueBindingExpression(valueBindingExpression))))
             {
                 metaDataEntry.setProperty(PropertyInformationKeys.SKIP_VALIDATION, true);

Modified: myfaces/extensions/validator/branches/branch_for_jsf_1_1/validation-modules/property-validation/src/main/java/org/apache/myfaces/extensions/validator/crossval/recorder/CrossValidationUserInputRecorder.java
URL: http://svn.apache.org/viewvc/myfaces/extensions/validator/branches/branch_for_jsf_1_1/validation-modules/property-validation/src/main/java/org/apache/myfaces/extensions/validator/crossval/recorder/CrossValidationUserInputRecorder.java?rev=986304&r1=986303&r2=986304&view=diff
==============================================================================
--- myfaces/extensions/validator/branches/branch_for_jsf_1_1/validation-modules/property-validation/src/main/java/org/apache/myfaces/extensions/validator/crossval/recorder/CrossValidationUserInputRecorder.java
(original)
+++ myfaces/extensions/validator/branches/branch_for_jsf_1_1/validation-modules/property-validation/src/main/java/org/apache/myfaces/extensions/validator/crossval/recorder/CrossValidationUserInputRecorder.java
Tue Aug 17 13:31:09 2010
@@ -18,6 +18,7 @@
  */
 package org.apache.myfaces.extensions.validator.crossval.recorder;
 
+import org.apache.myfaces.extensions.validator.core.el.ELHelper;
 import org.apache.myfaces.extensions.validator.core.recorder.ProcessedInformationRecorder;
 import org.apache.myfaces.extensions.validator.core.property.PropertyDetails;
 import org.apache.myfaces.extensions.validator.crossval.storage.ProcessedInformationStorageEntry;
@@ -40,6 +41,8 @@ import java.util.ArrayList;
 @UsageInformation(UsageCategory.INTERNAL)
 public class CrossValidationUserInputRecorder implements ProcessedInformationRecorder
 {
+    private ELHelper elHelper;
+
     public void recordUserInput(UIComponent uiComponent, Object value)
     {
         if (!(uiComponent instanceof EditableValueHolder))
@@ -53,8 +56,7 @@ public class CrossValidationUserInputRec
 
         ProcessedInformationStorageEntry entry;
 
-        PropertyDetails propertyDetails =
-            ExtValUtils.getELHelper().getPropertyDetailsOfValueBinding(uiComponent);
+        PropertyDetails propertyDetails = getELHelper().getPropertyDetailsOfValueBinding(uiComponent);
 
         if(propertyDetails == null)
         {
@@ -95,4 +97,13 @@ public class CrossValidationUserInputRec
             processedInformationStorage.setEntry(key, entry);
         }
     }
+
+    protected ELHelper getELHelper()
+    {
+        if(this.elHelper == null)
+        {
+            this.elHelper = ExtValUtils.getELHelper();
+        }
+        return this.elHelper;
+    }
 }

Modified: myfaces/extensions/validator/branches/branch_for_jsf_1_1/validation-modules/property-validation/src/main/java/org/apache/myfaces/extensions/validator/crossval/strategy/ELCompareStrategy.java
URL: http://svn.apache.org/viewvc/myfaces/extensions/validator/branches/branch_for_jsf_1_1/validation-modules/property-validation/src/main/java/org/apache/myfaces/extensions/validator/crossval/strategy/ELCompareStrategy.java?rev=986304&r1=986303&r2=986304&view=diff
==============================================================================
--- myfaces/extensions/validator/branches/branch_for_jsf_1_1/validation-modules/property-validation/src/main/java/org/apache/myfaces/extensions/validator/crossval/strategy/ELCompareStrategy.java
(original)
+++ myfaces/extensions/validator/branches/branch_for_jsf_1_1/validation-modules/property-validation/src/main/java/org/apache/myfaces/extensions/validator/crossval/strategy/ELCompareStrategy.java
Tue Aug 17 13:31:09 2010
@@ -18,6 +18,7 @@
  */
 package org.apache.myfaces.extensions.validator.crossval.strategy;
 
+import org.apache.myfaces.extensions.validator.core.el.ELHelper;
 import org.apache.myfaces.extensions.validator.crossval.storage.CrossValidationStorageEntry;
 import org.apache.myfaces.extensions.validator.crossval.storage.CrossValidationStorage;
 import org.apache.myfaces.extensions.validator.crossval.storage.ProcessedInformationStorage;
@@ -43,15 +44,16 @@ import java.util.logging.Logger;
 @UsageInformation(UsageCategory.INTERNAL)
 class ELCompareStrategy implements ReferencingStrategy
 {
-    protected final Logger logger = Logger.getLogger(getClass().getName());
+    private final Logger logger = Logger.getLogger(getClass().getName());
 
     public boolean evaluateReferenceAndValidate(
             CrossValidationStorageEntry crossValidationStorageEntry,
             CrossValidationStorage crossValidationStorage,
             String validationTarget, AbstractCompareStrategy compareStrategy)
     {
-        if (ExtValUtils.getELHelper().isELTermWellFormed(validationTarget) &&
-            ExtValUtils.getELHelper().isELTermValid(FacesContext.getCurrentInstance(), validationTarget))
+        ELHelper elHelper = ExtValUtils.getELHelper();
+        if (elHelper.isELTermWellFormed(validationTarget) &&
+            elHelper.isELTermValid(FacesContext.getCurrentInstance(), validationTarget))
         {
             tryToValidateValueBinding(
                     crossValidationStorageEntry,



Mime
View raw message