renamed executeConversion to simply convert for readibility
This commit is contained in:
@@ -52,7 +52,7 @@ public class StandardTypeConverter implements TypeConverter {
|
||||
|
||||
public Object convertValue(Object value, TypeDescriptor typeDescriptor) throws EvaluationException {
|
||||
try {
|
||||
return conversionService.executeConversion(value, typeDescriptor);
|
||||
return conversionService.convert(value, typeDescriptor);
|
||||
} catch (ConverterNotFoundException cenfe) {
|
||||
throw new SpelException(cenfe, SpelMessages.TYPE_CONVERSION_ERROR, value.getClass(), typeDescriptor.asString());
|
||||
} catch (ConversionException ce) {
|
||||
|
||||
@@ -64,14 +64,14 @@ public class ExpressionTestsUsingCoreConversionService extends ExpressionTestCas
|
||||
// ArrayList containing List<Integer> to List<String>
|
||||
Class<?> clazz = typeDescriptorForListOfString.getElementType();
|
||||
assertEquals(String.class,clazz);
|
||||
List l = (List) tcs.executeConversion(listOfInteger, typeDescriptorForListOfString);
|
||||
List l = (List) tcs.convert(listOfInteger, typeDescriptorForListOfString);
|
||||
assertNotNull(l);
|
||||
|
||||
// ArrayList containing List<String> to List<Integer>
|
||||
clazz = typeDescriptorForListOfInteger.getElementType();
|
||||
assertEquals(Integer.class,clazz);
|
||||
|
||||
l = (List) tcs.executeConversion(listOfString, typeDescriptorForListOfString);
|
||||
l = (List) tcs.convert(listOfString, typeDescriptorForListOfString);
|
||||
assertNotNull(l);
|
||||
}
|
||||
|
||||
@@ -103,13 +103,13 @@ public class ExpressionTestsUsingCoreConversionService extends ExpressionTestCas
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
public <T> T convertValue(Object value, Class<T> targetType) throws EvaluationException {
|
||||
return (T)super.executeConversion(value,TypeDescriptor.valueOf(targetType));
|
||||
return (T)super.convert(value,TypeDescriptor.valueOf(targetType));
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
public Object convertValue(Object value, TypeDescriptor typeDescriptor)
|
||||
throws EvaluationException {
|
||||
return super.executeConversion(value, typeDescriptor);
|
||||
return super.convert(value, typeDescriptor);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user