Author: norman.richards(a)jboss.com
Date: 2009-06-15 19:54:27 -0400 (Mon, 15 Jun 2009)
New Revision: 11160
Modified:
branches/community/Seam_2_2/src/main/org/jboss/seam/el/SeamELResolver.java
Log:
JBSEAM-4244
Modified: branches/community/Seam_2_2/src/main/org/jboss/seam/el/SeamELResolver.java
===================================================================
--- branches/community/Seam_2_2/src/main/org/jboss/seam/el/SeamELResolver.java 2009-06-15
22:44:48 UTC (rev 11159)
+++ branches/community/Seam_2_2/src/main/org/jboss/seam/el/SeamELResolver.java 2009-06-15
23:54:27 UTC (rev 11160)
@@ -80,28 +80,29 @@
}
}
- private Object resolveInMap(ELContext context, Map map, Object property) {
- try {
- if (map.containsKey(property)) {
- return null;
- }
- } catch (UnsupportedOperationException e) {
- // eat it
- }
-
- if ("size".equals(property)) {
+ private boolean containsKey(Map map, String key) {
+ try {
+ return map.containsKey(key);
+ } catch (UnsupportedOperationException e) {
+ // eat it
+ return false;
+ }
+ }
+
+ private Object resolveInMap(ELContext context, Map map, Object property) {
+ if ("size".equals(property) &&
!containsKey(map,"size")) {
context.setPropertyResolved(true);
return map.size();
- } else if ("values".equals(property)) {
+ } else if ("values".equals(property) &&
!containsKey(map,"values")) {
context.setPropertyResolved(true);
return map.values();
- } else if ("keySet".equals(property)) {
+ } else if ("keySet".equals(property) &&
!containsKey(map,"keySet")) {
context.setPropertyResolved(true);
return map.keySet();
- } else if ("entrySet".equals(property)) {
+ } else if ("entrySet".equals(property) &&
!containsKey(map,"entrySet")) {
context.setPropertyResolved(true);
return map.entrySet();
Show replies by date