Skip to content

Commit 0beb56a

Browse files
izeyesdeleuze
authored andcommitted
Fix indentation to use tabs in Kotlin source files
Closes gh-33840
1 parent 6bd4687 commit 0beb56a

File tree

11 files changed

+531
-531
lines changed

11 files changed

+531
-531
lines changed

Diff for: integration-tests/src/test/kotlin/org/springframework/aop/framework/autoproxy/AspectJAutoProxyInterceptorKotlinIntegrationTests.kt

+61-61
Original file line numberDiff line numberDiff line change
@@ -56,33 +56,33 @@ import kotlin.annotation.AnnotationTarget.TYPE
5656
@SpringJUnitConfig(InterceptorConfig::class)
5757
@DirtiesContext(classMode = DirtiesContext.ClassMode.AFTER_EACH_TEST_METHOD)
5858
class AspectJAutoProxyInterceptorKotlinIntegrationTests(
59-
@Autowired val echo: Echo,
60-
@Autowired val firstAdvisor: TestPointcutAdvisor,
61-
@Autowired val secondAdvisor: TestPointcutAdvisor,
62-
@Autowired val countingAspect: CountingAspect,
63-
@Autowired val reactiveTransactionManager: ReactiveCallCountingTransactionManager) {
64-
65-
@Test
66-
fun `Multiple interceptors with regular function`() {
67-
assertThat(firstAdvisor.interceptor.invocations).isEmpty()
68-
assertThat(secondAdvisor.interceptor.invocations).isEmpty()
69-
val value = "Hello!"
70-
assertThat(echo.echo(value)).isEqualTo(value)
59+
@Autowired val echo: Echo,
60+
@Autowired val firstAdvisor: TestPointcutAdvisor,
61+
@Autowired val secondAdvisor: TestPointcutAdvisor,
62+
@Autowired val countingAspect: CountingAspect,
63+
@Autowired val reactiveTransactionManager: ReactiveCallCountingTransactionManager) {
64+
65+
@Test
66+
fun `Multiple interceptors with regular function`() {
67+
assertThat(firstAdvisor.interceptor.invocations).isEmpty()
68+
assertThat(secondAdvisor.interceptor.invocations).isEmpty()
69+
val value = "Hello!"
70+
assertThat(echo.echo(value)).isEqualTo(value)
7171
assertThat(firstAdvisor.interceptor.invocations).singleElement().matches { String::class.java.isAssignableFrom(it) }
7272
assertThat(secondAdvisor.interceptor.invocations).singleElement().matches { String::class.java.isAssignableFrom(it) }
73-
}
74-
75-
@Test
76-
fun `Multiple interceptors with suspending function`() {
77-
assertThat(firstAdvisor.interceptor.invocations).isEmpty()
78-
assertThat(secondAdvisor.interceptor.invocations).isEmpty()
79-
val value = "Hello!"
80-
runBlocking {
81-
assertThat(echo.suspendingEcho(value)).isEqualTo(value)
82-
}
73+
}
74+
75+
@Test
76+
fun `Multiple interceptors with suspending function`() {
77+
assertThat(firstAdvisor.interceptor.invocations).isEmpty()
78+
assertThat(secondAdvisor.interceptor.invocations).isEmpty()
79+
val value = "Hello!"
80+
runBlocking {
81+
assertThat(echo.suspendingEcho(value)).isEqualTo(value)
82+
}
8383
assertThat(firstAdvisor.interceptor.invocations).singleElement().matches { Mono::class.java.isAssignableFrom(it) }
8484
assertThat(secondAdvisor.interceptor.invocations).singleElement().matches { Mono::class.java.isAssignableFrom(it) }
85-
}
85+
}
8686

8787
@Test // gh-33095
8888
fun `Aspect and reactive transactional with suspending function`() {
@@ -113,17 +113,17 @@ class AspectJAutoProxyInterceptorKotlinIntegrationTests(
113113
assertThat(countingAspect.counter).`as`("aspect applied once per key").isEqualTo(2)
114114
}
115115

116-
@Configuration
117-
@EnableAspectJAutoProxy
118-
@EnableTransactionManagement
116+
@Configuration
117+
@EnableAspectJAutoProxy
118+
@EnableTransactionManagement
119119
@EnableCaching
120-
open class InterceptorConfig {
120+
open class InterceptorConfig {
121121

122-
@Bean
123-
open fun firstAdvisor() = TestPointcutAdvisor().apply { order = 0 }
122+
@Bean
123+
open fun firstAdvisor() = TestPointcutAdvisor().apply { order = 0 }
124124

125-
@Bean
126-
open fun secondAdvisor() = TestPointcutAdvisor().apply { order = 1 }
125+
@Bean
126+
open fun secondAdvisor() = TestPointcutAdvisor().apply { order = 1 }
127127

128128
@Bean
129129
open fun countingAspect() = CountingAspect()
@@ -138,34 +138,34 @@ class AspectJAutoProxyInterceptorKotlinIntegrationTests(
138138
return ConcurrentMapCacheManager()
139139
}
140140

141-
@Bean
142-
open fun echo(): Echo {
143-
return Echo()
144-
}
145-
}
141+
@Bean
142+
open fun echo(): Echo {
143+
return Echo()
144+
}
145+
}
146146

147-
class TestMethodInterceptor: MethodInterceptor {
147+
class TestMethodInterceptor: MethodInterceptor {
148148

149-
var invocations: MutableList<Class<*>> = mutableListOf()
149+
var invocations: MutableList<Class<*>> = mutableListOf()
150150

151-
@Suppress("RedundantNullableReturnType")
152-
override fun invoke(invocation: MethodInvocation): Any? {
153-
val result = invocation.proceed()
154-
invocations.add(result!!.javaClass)
155-
return result
156-
}
151+
@Suppress("RedundantNullableReturnType")
152+
override fun invoke(invocation: MethodInvocation): Any? {
153+
val result = invocation.proceed()
154+
invocations.add(result!!.javaClass)
155+
return result
156+
}
157157

158-
}
158+
}
159159

160-
class TestPointcutAdvisor : StaticMethodMatcherPointcutAdvisor(TestMethodInterceptor()) {
160+
class TestPointcutAdvisor : StaticMethodMatcherPointcutAdvisor(TestMethodInterceptor()) {
161161

162-
val interceptor: TestMethodInterceptor
163-
get() = advice as TestMethodInterceptor
162+
val interceptor: TestMethodInterceptor
163+
get() = advice as TestMethodInterceptor
164164

165-
override fun matches(method: Method, targetClass: Class<*>): Boolean {
166-
return targetClass == Echo::class.java && method.name.lowercase().endsWith("echo")
167-
}
168-
}
165+
override fun matches(method: Method, targetClass: Class<*>): Boolean {
166+
return targetClass == Echo::class.java && method.name.lowercase().endsWith("echo")
167+
}
168+
}
169169

170170
@Target(CLASS, FUNCTION, ANNOTATION_CLASS, TYPE)
171171
@Retention(AnnotationRetention.RUNTIME)
@@ -185,16 +185,16 @@ class AspectJAutoProxyInterceptorKotlinIntegrationTests(
185185
}
186186
}
187187

188-
open class Echo {
188+
open class Echo {
189189

190-
open fun echo(value: String): String {
191-
return value
192-
}
190+
open fun echo(value: String): String {
191+
return value
192+
}
193193

194-
open suspend fun suspendingEcho(value: String): String {
195-
delay(1)
196-
return value
197-
}
194+
open suspend fun suspendingEcho(value: String): String {
195+
delay(1)
196+
return value
197+
}
198198

199199
@Transactional
200200
@Counting
@@ -212,6 +212,6 @@ class AspectJAutoProxyInterceptorKotlinIntegrationTests(
212212
return "$value ${cacheCounter++}"
213213
}
214214

215-
}
215+
}
216216

217217
}

Diff for: spring-aop/src/test/kotlin/org/springframework/aop/support/AopUtilsKotlinTests.kt

+14-14
Original file line numberDiff line numberDiff line change
@@ -31,17 +31,17 @@ import kotlin.coroutines.Continuation
3131
*/
3232
class AopUtilsKotlinTests {
3333

34-
@Test
35-
fun `Invoking suspending function should return Mono`() {
36-
val value = "foo"
37-
val method = ReflectionUtils.findMethod(WithoutInterface::class.java, "handle",
34+
@Test
35+
fun `Invoking suspending function should return Mono`() {
36+
val value = "foo"
37+
val method = ReflectionUtils.findMethod(WithoutInterface::class.java, "handle",
3838
String::class. java, Continuation::class.java)!!
39-
val continuation = Continuation<Any>(CoroutineName("test")) { }
39+
val continuation = Continuation<Any>(CoroutineName("test")) { }
4040
val result = AopUtils.invokeJoinpointUsingReflection(WithoutInterface(), method, arrayOf(value, continuation))
41-
assertThat(result).isInstanceOfSatisfying(Mono::class.java) {
42-
assertThat(it.block()).isEqualTo(value)
43-
}
44-
}
41+
assertThat(result).isInstanceOfSatisfying(Mono::class.java) {
42+
assertThat(it.block()).isEqualTo(value)
43+
}
44+
}
4545

4646
@Test
4747
fun `Invoking suspending function on bridged method should return Mono`() {
@@ -54,11 +54,11 @@ class AopUtilsKotlinTests {
5454
}
5555
}
5656

57-
@Suppress("unused")
58-
suspend fun suspendingFunction(value: String): String {
59-
delay(1)
60-
return value
61-
}
57+
@Suppress("unused")
58+
suspend fun suspendingFunction(value: String): String {
59+
delay(1)
60+
return value
61+
}
6262

6363
class WithoutInterface {
6464
suspend fun handle(value: String): String {

0 commit comments

Comments
 (0)