Author: oros
Date: Sun Oct 2 05:45:03 2005
New Revision: 293105
URL: http://svn.apache.org/viewcvs?rev=293105&view=rev
Log:
MYFACES-623: revert PropertyResolverImpl changes to r289849; removed coercion in ValueBindingImpl.setValue
Modified:
myfaces/impl/branches/1_1_1/src/java/org/apache/myfaces/el/PropertyResolverImpl.java
myfaces/impl/branches/1_1_1/src/java/org/apache/myfaces/el/ValueBindingImpl.java
Modified: myfaces/impl/branches/1_1_1/src/java/org/apache/myfaces/el/PropertyResolverImpl.java
URL: http://svn.apache.org/viewcvs/myfaces/impl/branches/1_1_1/src/java/org/apache/myfaces/el/PropertyResolverImpl.java?rev=293105&r1=293104&r2=293105&view=diff
==============================================================================
--- myfaces/impl/branches/1_1_1/src/java/org/apache/myfaces/el/PropertyResolverImpl.java (original)
+++ myfaces/impl/branches/1_1_1/src/java/org/apache/myfaces/el/PropertyResolverImpl.java Sun
Oct 2 05:45:03 2005
@@ -274,13 +274,10 @@
if (base instanceof Map)
{
- //Object value = ((Map) base).get(property);
+ Object value = ((Map) base).get(property);
// REVISIT: when generics are imlemented in JVM 1.5
- // -- return (value == null) ? Object.class : value.getClass();
- // A Fix for Issue #623, since a map does not need its values correced
- // should be able to return null from here and have things work
- return null;
+ return (value == null) ? Object.class : value.getClass();
}
// If none of the special bean types, then process as normal Bean
Modified: myfaces/impl/branches/1_1_1/src/java/org/apache/myfaces/el/ValueBindingImpl.java
URL: http://svn.apache.org/viewcvs/myfaces/impl/branches/1_1_1/src/java/org/apache/myfaces/el/ValueBindingImpl.java?rev=293105&r1=293104&r2=293105&view=diff
==============================================================================
--- myfaces/impl/branches/1_1_1/src/java/org/apache/myfaces/el/ValueBindingImpl.java (original)
+++ myfaces/impl/branches/1_1_1/src/java/org/apache/myfaces/el/ValueBindingImpl.java Sun Oct
2 05:45:03 2005
@@ -266,16 +266,14 @@
Integer index = ELParserHelper.toIndex(base, property);
if (index == null)
{
- Class clazz = propertyResolver.getType(base, property);
propertyResolver.setValue(
- base, property, coerce(newValue, clazz));
+ base, property, newValue);
}
else
{
int indexVal = index.intValue();
- Class clazz = propertyResolver.getType(base, indexVal);
propertyResolver.setValue(
- base, indexVal, coerce(newValue, clazz));
+ base, indexVal, newValue);
}
}
}
@@ -318,7 +316,7 @@
Object obj = scopeMap.get(name);
if (obj != null)
{
- scopeMap.put(name, coerce(newValue, obj.getClass()));
+ scopeMap.put(name, newValue);
return;
}
@@ -327,7 +325,7 @@
obj = scopeMap.get(name);
if (obj != null)
{
- scopeMap.put(name, coerce(newValue, obj.getClass()));
+ scopeMap.put(name, newValue);
return;
}
@@ -336,7 +334,7 @@
obj = scopeMap.get(name);
if (obj != null)
{
- scopeMap.put(name, coerce(newValue, obj.getClass()));
+ scopeMap.put(name, newValue);
return;
}
@@ -354,14 +352,14 @@
if (scope != null)
{
scope.put(externalContext, name,
- coerce(newValue, mbConfig.getManagedBeanClass()));
+ newValue);
return;
}
log.error("Managed bean '" + name + "' has illegal scope: "
+ scopeName);
externalContext.getRequestMap().put(name,
- coerce(newValue, mbConfig.getManagedBeanClass()));
+ newValue);
return;
}
|