SPR-5663: test and fix: inconsistency between canRead() and read() on ReflectivePropertyResolver

This commit is contained in:
Andy Clement
2009-04-22 17:57:24 +00:00
parent b1000cd5c6
commit d34a2c5d02
2 changed files with 43 additions and 17 deletions

View File

@@ -88,7 +88,7 @@ public class ReflectivePropertyResolver implements PropertyAccessor {
public TypedValue read(EvaluationContext context, Object target, String name) throws AccessException {
if (target == null) {
return null;
throw new AccessException("Cannot read property of null target");
}
Class<?> type = (target instanceof Class ? (Class<?>) target : target.getClass());