fixing TODOs
git-svn-id: https://src.springframework.org/svn/spring-framework/trunk@68 50f2f4bb-b051-0410-bef5-90022cba6387
This commit is contained in:
parent
6fa7cc5f92
commit
e1d71a30fd
|
|
@ -170,7 +170,7 @@ public class StandardEvaluationContext implements EvaluationContext {
|
|||
rootObject = o;
|
||||
}
|
||||
|
||||
// TODO 3 have a variant that adds at position (same for ctor/propOrField)
|
||||
// TODO have a variant that adds at position (same for ctor/propOrField)
|
||||
public void addMethodResolver(MethodResolver resolver) {
|
||||
methodResolvers.add(resolver);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -93,7 +93,7 @@ public class StandardTypeConverter implements TypeConverter {
|
|||
return false;
|
||||
}
|
||||
|
||||
// TODO 3 Q In case of a loss in information with coercion to a narrower type, should we throw an exception?
|
||||
// TODO In case of a loss in information with coercion to a narrower type, should we throw an exception?
|
||||
public Object convertValue(Object value, Class<?> targetType) throws SpelException {
|
||||
if (value == null || value.getClass() == targetType)
|
||||
return value;
|
||||
|
|
@ -201,7 +201,7 @@ public class StandardTypeConverter implements TypeConverter {
|
|||
try {
|
||||
Double.parseDouble((String) value);
|
||||
} catch (NumberFormatException nfe) {
|
||||
// TODO 3 Q throw something or leave the caller to throw a conversion exception?
|
||||
// returning null will mean the caller throws a type conversion related exception
|
||||
}
|
||||
} else if (value instanceof Integer) {
|
||||
return new Double(((Integer) value).intValue());
|
||||
|
|
|
|||
Loading…
Reference in New Issue