SPR-7244: double indexing with a collection of different types of element

This commit is contained in:
Andy Clement
2010-05-28 20:31:16 +00:00
parent d0393ea109
commit 5801af9ef5
2 changed files with 26 additions and 1 deletions

View File

@@ -89,7 +89,7 @@ public class Indexer extends SpelNodeImpl {
}
// Indexing into a Map
if (targetObjectTypeDescriptor.isMap()) {
if (targetObject instanceof Map) {
if (targetObject == null) {
// Current decision: attempt to index into null map == exception and does not just return null
throw new SpelEvaluationException(getStartPosition(),SpelMessage.CANNOT_INDEX_INTO_NULL_VALUE);