Skip to main content

[el-spec commits] [el-spec~source-code:211] Fix a backward compatibility that causes JSF failures

  • From: kchung@...
  • To: commits@...
  • Subject: [el-spec commits] [el-spec~source-code:211] Fix a backward compatibility that causes JSF failures
  • Date: Wed, 23 Jan 2013 20:51:05 +0000

Project:    el-spec
Repository: source-code
Revision:   211
Author:     kchung
Date:       2013-01-23 20:51:03 UTC
Link:       

Log Message:
------------
Fix a backward compatibility that causes JSF failures



Revisions:
----------
211


Modified Paths:
---------------
trunk/api/src/main/java/javax/el/ELContext.java


Diffs:
------
Index: trunk/api/src/main/java/javax/el/ELContext.java
===================================================================
--- trunk/api/src/main/java/javax/el/ELContext.java     (revision 210)
+++ trunk/api/src/main/java/javax/el/ELContext.java     (revision 211)
@@ -151,9 +151,12 @@
      * @see CompositeELResolver
      * @param base The base object
      * @param property The property object
+     *
+     * @since EL 3.0
      */
     public void setPropertyResolved(Object base, Object property) {
-        this.resolved = true;
+        setPropertyResolved(true); // Don't set the variable here, for 2.2 
users
+                                   // ELContext may be overridden or 
delegated.
         notifyPropertyResolved(base, property);
     }
 
@@ -447,6 +450,7 @@
      */
     public Object convertToType(Object obj,
                                 Class<?> targetType) {
+        boolean propertyResolvedSave = isPropertyResolved();
         try {
             setPropertyResolved(false);
             Object res = getELResolver().convertToType(this, obj, 
targetType);
@@ -457,6 +461,8 @@
             throw ex;
         } catch (Exception ex) {
             throw new ELException(ex);
+        } finally {
+            setPropertyResolved(propertyResolvedSave);
         }
         return ELUtil.getExpressionFactory().coerceToType(obj, targetType);
     }





[el-spec commits] [el-spec~source-code:211] Fix a backward compatibility that causes JSF failures

kchung 01/23/2013
 
 
Close
loading
Please Confirm
Close