Skip to content

Commit 238354a

Browse files
committed
Polishing
1 parent 51b1306 commit 238354a

File tree

2 files changed

+6
-5
lines changed

2 files changed

+6
-5
lines changed

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

+3-2
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

+3-3
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.
@@ -58,10 +58,10 @@ internal fun <T: Any> monoToDeferred(source: Mono<T>) =
5858
* @since 5.2
5959
*/
6060
@Suppress("UNCHECKED_CAST")
61-
fun invokeSuspendingFunction(method: Method, bean: Any, vararg args: Any?): Publisher<*> {
61+
fun invokeSuspendingFunction(method: Method, target: Any, vararg args: Any?): Publisher<*> {
6262
val function = method.kotlinFunction!!
6363
val mono = mono(Dispatchers.Unconfined) {
64-
function.callSuspend(bean, *args.sliceArray(0..(args.size-2))).let { if (it == Unit) null else it }
64+
function.callSuspend(target, *args.sliceArray(0..(args.size-2))).let { if (it == Unit) null else it }
6565
}.onErrorMap(InvocationTargetException::class.java) { it.targetException }
6666
return if (function.returnType.classifier == Flow::class) {
6767
mono.flatMapMany { (it as Flow<Any>).asFlux() }

0 commit comments

Comments
 (0)