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

@ -154,7 +154,6 @@ final class JdkDynamicAopProxy implements AopProxy, InvocationHandler, Serializa
@Override
@Nullable
public Object invoke(Object proxy, Method method, Object[] args) throws Throwable {
MethodInvocation invocation;
Object oldProxy = null;
boolean setProxyContext = false;
@ -207,7 +206,7 @@ final class JdkDynamicAopProxy implements AopProxy, InvocationHandler, Serializa
}
else {
// We need to create a method invocation...
invocation = new ReflectiveMethodInvocation(proxy, target, method, args, targetClass, chain);
MethodInvocation invocation = new ReflectiveMethodInvocation(proxy, target, method, args, targetClass, chain);
// Proceed to the joinpoint through the interceptor chain.
retVal = invocation.proceed();
}

View File

@ -522,8 +522,7 @@ class TypeConverterDelegate {
return original;
}
int i = 0;
for (; it.hasNext(); i++) {
for (int i = 0; it.hasNext(); i++) {
Object element = it.next();
String indexedPropertyName = buildIndexedPropertyName(propertyName, i);
Object convertedElement = convertIfNecessary(indexedPropertyName, null, element,

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

View File

@ -354,7 +354,7 @@ public abstract class AbstractSockJsService implements SockJsService, CorsConfig
String requestInfo = (logger.isDebugEnabled() ? request.getMethod() + " " + request.getURI() : null);
try {
if (sockJsPath.equals("") || sockJsPath.equals("/")) {
if (sockJsPath.isEmpty() || sockJsPath.equals("/")) {
if (requestInfo != null) {
logger.debug("Processing transport request: " + requestInfo);
}