Polishing

This commit is contained in:
Juergen Hoeller
2019-06-12 18:04:06 +02:00
parent 7622d1e3fa
commit 1d5a43f485
19 changed files with 40 additions and 40 deletions

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2002-2018 the original author or authors.
* Copyright 2002-2019 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -190,7 +190,7 @@ public class Indexer extends SpelNodeImpl {
throw new SpelEvaluationException(
getStartPosition(), SpelMessage.INDEXING_NOT_SUPPORTED_FOR_TYPE, targetDescriptor);
}
@Override
public boolean isCompilable() {
if (this.indexedType == IndexedType.ARRAY) {
@@ -210,7 +210,7 @@ public class Indexer extends SpelNodeImpl {
}
return false;
}
@Override
public void generateCode(MethodVisitor mv, CodeFlow cf) {
String descriptor = cf.lastDescriptor();
@@ -249,7 +249,7 @@ public class Indexer extends SpelNodeImpl {
mv.visitTypeInsn(CHECKCAST, "[C");
insn = CALOAD;
}
else {
else {
mv.visitTypeInsn(CHECKCAST, "["+ this.exitTypeDescriptor +
(CodeFlow.isPrimitiveArray(this.exitTypeDescriptor) ? "" : ";"));
//depthPlusOne(exitTypeDescriptor)+"Ljava/lang/Object;");
@@ -286,7 +286,7 @@ public class Indexer extends SpelNodeImpl {
}
mv.visitMethodInsn(
INVOKEINTERFACE, "java/util/Map", "get", "(Ljava/lang/Object;)Ljava/lang/Object;", true);
}
}
else if (this.indexedType == IndexedType.OBJECT) {
ReflectivePropertyAccessor.OptimalPropertyAccessor accessor =
@@ -313,7 +313,7 @@ public class Indexer extends SpelNodeImpl {
mv.visitFieldInsn((isStatic ? GETSTATIC : GETFIELD), classDesc, member.getName(),
CodeFlow.toJvmDescriptor(((Field) member).getType()));
}
}
}
cf.pushDescriptor(this.exitTypeDescriptor);
}
@@ -639,7 +639,7 @@ public class Indexer extends SpelNodeImpl {
}
@SuppressWarnings({ "rawtypes", "unchecked" })
@SuppressWarnings({"rawtypes", "unchecked"})
private class CollectionIndexingValueRef implements ValueRef {
private final Collection collection;