File tree 2 files changed +6
-5
lines changed
spring-aspects/src/main/java/org/springframework/transaction/aspectj
spring-core/kotlin-coroutines/src/main/kotlin/org/springframework/core
2 files changed +6
-5
lines changed Original file line number Diff line number Diff line change 1
1
/*
2
- * Copyright 2002-2017 the original author or authors.
2
+ * Copyright 2002-2020 the original author or authors.
3
3
*
4
4
* Licensed under the Apache License, Version 2.0 (the "License");
5
5
* you may not use this file except in compliance with the License.
@@ -59,7 +59,8 @@ public abstract aspect AbstractTransactionAspect extends TransactionAspectSuppor
59
59
60
60
@Override
61
61
public void destroy () {
62
- clearTransactionManagerCache(); // An aspect is basically a singleton
62
+ // An aspect is basically a singleton -> cleanup on destruction
63
+ clearTransactionManagerCache();
63
64
}
64
65
65
66
@SuppressAjWarnings (" adviceDidNotMatch" )
Original file line number Diff line number Diff line change 1
1
/*
2
- * Copyright 2002-2019 the original author or authors.
2
+ * Copyright 2002-2020 the original author or authors.
3
3
*
4
4
* Licensed under the Apache License, Version 2.0 (the "License");
5
5
* you may not use this file except in compliance with the License.
@@ -58,10 +58,10 @@ internal fun <T: Any> monoToDeferred(source: Mono<T>) =
58
58
* @since 5.2
59
59
*/
60
60
@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 <* > {
62
62
val function = method.kotlinFunction!!
63
63
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 }
65
65
}.onErrorMap(InvocationTargetException ::class .java) { it.targetException }
66
66
return if (function.returnType.classifier == Flow ::class ) {
67
67
mono.flatMapMany { (it as Flow <Any >).asFlux() }
You can’t perform that action at this time.
0 commit comments