A couple of trivial simplifications

This commit is contained in:
stsypanov
2019-05-16 22:53:01 +03:00
committed by Juergen Hoeller
parent 02850f357f
commit 6f07a504b8
4 changed files with 4 additions and 8 deletions

View File

@@ -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) {