A couple of trivial simplifications
This commit is contained in:
committed by
Juergen Hoeller
parent
02850f357f
commit
6f07a504b8
@@ -92,12 +92,11 @@ public class Projection extends SpelNodeImpl {
|
||||
(Iterable<?>) operand : Arrays.asList(ObjectUtils.toObjectArray(operand)));
|
||||
|
||||
List<Object> result = new ArrayList<>();
|
||||
int idx = 0;
|
||||
Class<?> arrayElementType = null;
|
||||
for (Object element : data) {
|
||||
try {
|
||||
state.pushActiveContextObject(new TypedValue(element));
|
||||
state.enterScope("index", idx);
|
||||
state.enterScope("index", result.size());
|
||||
Object value = this.children[0].getValueInternal(state).getValue();
|
||||
if (value != null && operandIsArray) {
|
||||
arrayElementType = determineCommonType(arrayElementType, value.getClass());
|
||||
@@ -108,7 +107,6 @@ public class Projection extends SpelNodeImpl {
|
||||
state.exitScope();
|
||||
state.popActiveContextObject();
|
||||
}
|
||||
idx++;
|
||||
}
|
||||
|
||||
if (operandIsArray) {
|
||||
|
||||
Reference in New Issue
Block a user