Skip to content

Commit 240cfb1

Browse files
committed
Polishing
1 parent db27862 commit 240cfb1

File tree

3 files changed

+8
-8
lines changed

3 files changed

+8
-8
lines changed

spring-aspects/src/main/java/org/springframework/transaction/aspectj/AbstractTransactionAspect.aj

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2002-2017 the original author or authors.
2+
* Copyright 2002-2020 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -59,7 +59,8 @@ public abstract aspect AbstractTransactionAspect extends TransactionAspectSuppor
5959

6060
@Override
6161
public void destroy() {
62-
clearTransactionManagerCache(); // An aspect is basically a singleton
62+
// An aspect is basically a singleton -> cleanup on destruction
63+
clearTransactionManagerCache();
6364
}
6465

6566
@SuppressAjWarnings("adviceDidNotMatch")

spring-core/kotlin-coroutines/src/main/kotlin/org/springframework/core/CoroutinesUtils.kt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2002-2019 the original author or authors.
2+
* Copyright 2002-2020 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -66,10 +66,10 @@ internal fun isSuspendingFunction(method: Method) = method.kotlinFunction!!.isSu
6666
* @since 5.2
6767
*/
6868
@Suppress("UNCHECKED_CAST")
69-
internal fun invokeSuspendingFunction(method: Method, bean: Any, vararg args: Any?): Publisher<*> {
69+
internal fun invokeSuspendingFunction(method: Method, target: Any, vararg args: Any?): Publisher<*> {
7070
val function = method.kotlinFunction!!
7171
val mono = mono(Dispatchers.Unconfined) {
72-
function.callSuspend(bean, *args.sliceArray(0..(args.size-2))).let { if (it == Unit) null else it }
72+
function.callSuspend(target, *args.sliceArray(0..(args.size-2))).let { if (it == Unit) null else it }
7373
}.onErrorMap(InvocationTargetException::class.java) { it.targetException }
7474
return if (function.returnType.classifier == Flow::class) {
7575
mono.flatMapMany { (it as Flow<Any>).asFlux() }

spring-expression/src/main/java/org/springframework/expression/spel/ast/AstUtils.java

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2002-2018 the original author or authors.
2+
* Copyright 2002-2020 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -54,10 +54,9 @@ public static List<PropertyAccessor> getPropertyAccessorsToTry(
5454
}
5555
else {
5656
if (targetType != null) {
57-
int pos = 0;
5857
for (Class<?> clazz : targets) {
5958
if (clazz == targetType) { // put exact matches on the front to be tried first?
60-
specificAccessors.add(pos++, resolver);
59+
specificAccessors.add(resolver);
6160
}
6261
else if (clazz.isAssignableFrom(targetType)) { // put supertype matches at the end of the
6362
// specificAccessor list

0 commit comments

Comments
 (0)