renamed executeConversion to simply convert for readibility

This commit is contained in:
Keith Donald
2009-05-11 21:25:33 +00:00
parent c3f54b4cb4
commit 50985d5aa9
5 changed files with 16 additions and 16 deletions

View File

@@ -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) {

View File

@@ -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);
}
}