You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Lambda error detection might not work on JDK 9 [SPR-16435] #20981
in: coreIssues in core modules (aop, beans, core, context, expression)status: backportedAn issue that has been backported to maintenance branchestype: bugA general bug
I recently extracted the lambda class error detection logic into a dedicated util in Spring Boot and added a lot of additional tests.
Interestingly, the tests failed on JDK 9 with the following:
ERROR] callbacksInvokeWhenMultipleShouldInvokeSuitable(org.springframework.boot.util.LambdaSafeTests) Time elapsed: 0 s <<< ERROR!
java.lang.ClassCastException: java.base/java.lang.String cannot be cast to java.base/java.lang.StringBuilder
I appears that the format of the ClassCastException has changed and it now includes the module name. I've attempted to fix this in Spring Boot by including the module name, but since this code also appears in framework I thought you might have the same issue.
Since we only need this in SimpleApplicationEventMulticaster for a very specific purpose and do some over-swallowing for ClassCastExceptions without a message already, I'll add the simplest possible check here: the exception message either starting with the event class name or containing the event class name after the first occurence of a slash.
in: coreIssues in core modules (aop, beans, core, context, expression)status: backportedAn issue that has been backported to maintenance branchestype: bugA general bug
Activity
spring-projects-issues commentedon Jan 30, 2018
Juergen Hoeller commented
Since we only need this in
SimpleApplicationEventMulticasterfor a very specific purpose and do some over-swallowing forClassCastExceptionswithout a message already, I'll add the simplest possible check here: the exception message either starting with the event class name or containing the event class name after the first occurence of a slash.