-
Notifications
You must be signed in to change notification settings - Fork 38.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Kotlin checked exception thrown from proxy service causes UndeclaredThrowableException
#33585
Comments
Thanks for the report. The proxying here is part of Spring Framework's support for |
Thanks |
I can't reproduce so please provide a self-contained reproduced (including the Maven or Gradle build) via an attached archive or a link to a repository. |
Sure, here is demo for issue reproduction https://github.com/razubuddy/demo This is a generated application with Spring Boot 3.4.0-M3, it uses spring-framework 6.2.0-RC1 |
I think this is regression which was fixed once in the past #23844 |
@sdeleuze that special code path propagated the exception as-is, and we're always propagating exceptions as-is there now. Is the As a side note: As of #32469, |
@jhoeller Indeed, the related If I enable the Spring Boot AOT plugin to see what the CGLIB generated class looks, I see: public final Map results() {
try {
MethodInterceptor var10000 = this.CGLIB$CALLBACK_0;
if (var10000 == null) {
CGLIB$BIND_CALLBACKS(this);
var10000 = this.CGLIB$CALLBACK_0;
}
return var10000 != null ? (Map)var10000.intercept(this, CGLIB$results$0$Method, CGLIB$emptyArgs, CGLIB$results$0$Proxy) : super.results();
} catch (Error | RuntimeException var1) {
throw var1;
} catch (Throwable var2) {
throw new UndeclaredThrowableException(var2);
}
} I guess we need to skip that |
UndeclaredThrowableException
@sdeleuze maybe we could do that Kotlin check in our |
The commit skips using UndeclaredThrowableStrategy for Kotlin classes in CglibAopProxy in order to fix a related regression caused by spring-projectsgh-32469. See spring-projectsgh-33585
Spring Boot: 3.4.0-M3
This is minimal code to reproduce:
Expected output:
Actual output:
The text was updated successfully, but these errors were encountered: