dev@javaserverfaces.java.net

[REVIEW] Bring ImplicitObjectELResolver into compliance with specification

From: Ryan Lubke <Ryan.Lubke_at_Sun.COM>
Date: Thu, 16 Jun 2005 14:42:35 -0400

SECTION: Modified Files
----------------------------
M src/com/sun/faces/el/ImplicitObjectELResolver.java
  - make zero inclusive as a valid result otherwise the
    application implicit object is not considered

SECTION: Diffs
----------------------------

Index: src/com/sun/faces/el/ImplicitObjectELResolver.java
===================================================================
RCS file:
/cvs/javaserverfaces-sources/jsf-ri/src/com/sun/faces/el/ImplicitObjectELResolver.java,v
retrieving revision 1.2
diff -u -r1.2 ImplicitObjectELResolver.java
--- src/com/sun/faces/el/ImplicitObjectELResolver.java 1 Jun 2005
14:03:34 -0000 1.2
+++ src/com/sun/faces/el/ImplicitObjectELResolver.java 16 Jun 2005
18:43:39 -0000
@@ -118,7 +118,7 @@
         }
         
         int index = Arrays.binarySearch(IMPLICIT_OBJECTS, property);
- if (index > 0) {
+ if (index >= 0) {
             throw new PropertyNotWritableException((String)property);
         }
     }
@@ -136,11 +136,11 @@
         }
         
         int index = Arrays.binarySearch(IMPLICIT_OBJECTS, property);
- if (index > 0) {
+ if (index >= 0) {
             context.setPropertyResolved(true);
             return true;
         }
- return false;
+ return false;
     }
 
     public Class getType(ELContext context, Object base, Object property)
@@ -156,7 +156,7 @@
         }
         
         int index = Arrays.binarySearch(IMPLICIT_OBJECTS, property);
- if (index > 0) {
+ if (index >= 0) {
             context.setPropertyResolved(true);
         }
         return null;