Browse Source

minor fix

git-svn-id: https://src.springframework.org/svn/spring-framework/trunk@1014 50f2f4bb-b051-0410-bef5-90022cba6387
pull/1/head
Andy Clement 17 years ago
parent
commit
93ded6edf7
  1. 3
      org.springframework.expression/src/main/java/org/springframework/expression/spel/ast/Projection.java

3
org.springframework.expression/src/main/java/org/springframework/expression/spel/ast/Projection.java

@ -58,7 +58,6 @@ public class Projection extends SpelNodeImpl {
if (operand instanceof Map) { if (operand instanceof Map) {
Map<?, ?> mapdata = (Map<?, ?>) operand; Map<?, ?> mapdata = (Map<?, ?>) operand;
List<Object> result = new ArrayList<Object>(); List<Object> result = new ArrayList<Object>();
mapdata.entrySet();
for (Map.Entry entry : mapdata.entrySet()) { for (Map.Entry entry : mapdata.entrySet()) {
try { try {
state.pushActiveContextObject(new TypedValue(entry,TypeDescriptor.valueOf(Map.Entry.class))); state.pushActiveContextObject(new TypedValue(entry,TypeDescriptor.valueOf(Map.Entry.class)));
@ -67,7 +66,7 @@ public class Projection extends SpelNodeImpl {
state.popActiveContextObject(); state.popActiveContextObject();
} }
} }
return new TypedValue(result,TypeDescriptor.valueOf(Map.class)); // TODO unable to build correct type descriptor return new TypedValue(result,TypeDescriptor.valueOf(List.class)); // TODO unable to build correct type descriptor
} else if (operand instanceof List) { } else if (operand instanceof List) {
List<Object> data = new ArrayList<Object>(); List<Object> data = new ArrayList<Object>();
data.addAll((Collection<?>) operand); data.addAll((Collection<?>) operand);

Loading…
Cancel
Save