Prior to this commit, AOT processing for bean validation failed with StackOverflowError
for constraints with fields having recursive generic types. With this change, the processing aborts preemptively when a cycle is detected.
- Fixes #33936
Comment From: bjorntj
I see this is marked as release 6.2.1 but I guess that is a month away. Anyway to get this fix now?
Comment From: sbrannen
I see this is marked as release 6.2.1 but I guess that is a month away. Anyway to get this fix now?
@bjorntj, we will decide when to release 6.2.1 within the team in the coming days.
Comment From: sbrannen
This has been merged into 6.2.x
and main
in 5e7b3a3bedb846f01ab01e056e58c1df4d2ab3d7 and slightly revised in 051f1dac241825159618c0397fd7966c78ece549.
Thanks for the PR and for collaborating with me on this at Hack.Commit.Push 2024! 👍
Comment From: edeandrea
Is there a workaround for this fix or do we need to wait for the next release? Removing the spring-boot-starter-validation
dependency isn't a viable workaround in my case.
Comment From: sbrannen
Is there a workaround for this fix or do we need to wait for the next release?
It depends...
If you need the AOT processing to occur, no, there is unfortunately no workaround, and you'll have to wait for the 6.2.1 release which is scheduled for next Thursday.
However, if you just want to run your tests via the build or build your application for standard JVM deployment, you could disable the AOT processing when you run the build.
Comment From: edeandrea
Thanks @sbrannen thats what I thought. In my case I'm running the -PnativeTests
in my CI workflow (to ensure that the tests run against a native binary). Thats whats failing. The JVM-only tests run fine (as you stated).