Closed kzander91 closed 11 months ago
Ouch that's an oversight in the StandardTypeLocator
cache handling where we mean to not cache if the class is reloadable, but the code path actually not just bypasses the cache, it also bypasses the return statement... Sorry for the glitch, we'll fix this ASAP.
Starting with Boot 3.1.6/Framework 6.0.14, the following SpEL expression fails to resolve the referenced type, but only when devtools is on the classpath:
T(com.example.MyEnum).VALUE
The following exception is thrown:Downgrading to Framework 6.0.13, or removing devtools fixes it.
Reproducer: demo.zip
Main:
MyEnum.java:
Extract and run
./mvnw spring-boot:run
, the exception occurs. Open the pom.xml and change the Spring Framework version to 6.0.13, run again and the code succeeds. Alternatively, leave the Spring Framework version as is and remove the devtools dependency instead, run again and the code succeeds as well.Maybe related: #31579