introduced TypeDescriptor.OBJECT and TypeDescriptor.STRING
This commit is contained in:
@@ -257,10 +257,10 @@ public class ExpressionStateTests extends ExpressionTestCase {
|
||||
@Test
|
||||
public void testTypeConversion() throws EvaluationException {
|
||||
ExpressionState state = getState();
|
||||
String s = (String)state.convertValue(34,TypeDescriptor.valueOf(String.class));
|
||||
String s = (String)state.convertValue(34,TypeDescriptor.STRING);
|
||||
Assert.assertEquals("34",s);
|
||||
|
||||
s = (String)state.convertValue(new TypedValue(34),TypeDescriptor.valueOf(String.class));
|
||||
s = (String)state.convertValue(new TypedValue(34),TypeDescriptor.STRING);
|
||||
Assert.assertEquals("34",s);
|
||||
}
|
||||
|
||||
|
||||
@@ -78,7 +78,7 @@ public class MapAccessTests extends ExpressionTestCase {
|
||||
}
|
||||
|
||||
public TypedValue read(EvaluationContext context, Object target, String name) throws AccessException {
|
||||
return new TypedValue(((Map) target).get(name), TypeDescriptor.valueOf(Object.class));
|
||||
return new TypedValue(((Map) target).get(name), TypeDescriptor.OBJECT);
|
||||
}
|
||||
|
||||
public boolean canWrite(EvaluationContext context, Object target, String name) throws AccessException {
|
||||
|
||||
@@ -155,7 +155,7 @@ public class PropertyAccessTests extends ExpressionTestCase {
|
||||
public TypedValue read(EvaluationContext context, Object target, String name) throws AccessException {
|
||||
if (!name.equals("flibbles"))
|
||||
throw new RuntimeException("Assertion Failed! name should be flibbles");
|
||||
return new TypedValue(flibbles, TypeDescriptor.valueOf(String.class));
|
||||
return new TypedValue(flibbles, TypeDescriptor.STRING);
|
||||
}
|
||||
|
||||
public void write(EvaluationContext context, Object target, String name, Object newValue)
|
||||
|
||||
@@ -219,7 +219,7 @@ public class SpringEL300Tests extends ExpressionTestCase {
|
||||
}
|
||||
|
||||
public TypedValue read(EvaluationContext context, Object target, String name) throws AccessException {
|
||||
return new TypedValue(((Map) target).get(name), TypeDescriptor.valueOf(Object.class));
|
||||
return new TypedValue(((Map) target).get(name), TypeDescriptor.OBJECT);
|
||||
}
|
||||
|
||||
public boolean canWrite(EvaluationContext context, Object target, String name) throws AccessException {
|
||||
|
||||
Reference in New Issue
Block a user