diff --git a/spring-aop/src/test/kotlin/org/springframework/aop/framework/CglibAopProxyKotlinTests.kt b/spring-aop/src/test/kotlin/org/springframework/aop/framework/CglibAopProxyKotlinTests.kt index 10e632abd3..0489d68bb0 100644 --- a/spring-aop/src/test/kotlin/org/springframework/aop/framework/CglibAopProxyKotlinTests.kt +++ b/spring-aop/src/test/kotlin/org/springframework/aop/framework/CglibAopProxyKotlinTests.kt @@ -19,6 +19,7 @@ package org.springframework.aop.framework import org.assertj.core.api.Assertions.assertThat import org.assertj.core.api.Assertions.assertThatThrownBy import org.junit.jupiter.api.Test +import java.time.LocalDateTime /** * Tests for Kotlin support in [CglibAopProxy]. @@ -48,6 +49,13 @@ class CglibAopProxyKotlinTests { assertThatThrownBy { proxy.checkedException() }.isInstanceOf(CheckedException::class.java) } + @Test // gh-35487 + fun jvmDefault() { + val proxyFactory = ProxyFactory() + proxyFactory.setTarget(AddressRepo()) + proxyFactory.proxy + } + open class MyKotlinBean { @@ -63,4 +71,24 @@ class CglibAopProxyKotlinTests { } class CheckedException() : Exception() + + open class AddressRepo(): CrudRepo
+ + interface CrudRepo