File tree Expand file tree Collapse file tree 3 files changed +8
-8
lines changed
spring-aspects/src/main/java/org/springframework/transaction/aspectj
spring-core/kotlin-coroutines/src/main/kotlin/org/springframework/core
spring-expression/src/main/java/org/springframework/expression/spel/ast Expand file tree Collapse file tree 3 files changed +8
-8
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.
@@ -66,10 +66,10 @@ internal fun isSuspendingFunction(method: Method) = method.kotlinFunction!!.isSu
66
66
* @since 5.2
67
67
*/
68
68
@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 <* > {
70
70
val function = method.kotlinFunction!!
71
71
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 }
73
73
}.onErrorMap(InvocationTargetException ::class .java) { it.targetException }
74
74
return if (function.returnType.classifier == Flow ::class ) {
75
75
mono.flatMapMany { (it as Flow <Any >).asFlux() }
Original file line number Diff line number Diff line change 1
1
/*
2
- * Copyright 2002-2018 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.
@@ -54,10 +54,9 @@ public static List<PropertyAccessor> getPropertyAccessorsToTry(
54
54
}
55
55
else {
56
56
if (targetType != null ) {
57
- int pos = 0 ;
58
57
for (Class <?> clazz : targets ) {
59
58
if (clazz == targetType ) { // put exact matches on the front to be tried first?
60
- specificAccessors .add (pos ++, resolver );
59
+ specificAccessors .add (resolver );
61
60
}
62
61
else if (clazz .isAssignableFrom (targetType )) { // put supertype matches at the end of the
63
62
// specificAccessor list
You can’t perform that action at this time.
0 commit comments