mirror of
https://github.com/spring-projects/spring-framework
synced 2026-06-08 17:33:33 +00:00
SimpleApplicationEventMulticaster defensively swallows ClassCastException without message
Issue: SPR-15145
This commit is contained in:
+1
-1
@@ -168,7 +168,7 @@ public class SimpleApplicationEventMulticaster extends AbstractApplicationEventM
|
||||
}
|
||||
catch (ClassCastException ex) {
|
||||
String msg = ex.getMessage();
|
||||
if (msg != null && msg.startsWith(event.getClass().getName())) {
|
||||
if (msg == null || msg.startsWith(event.getClass().getName())) {
|
||||
// Possibly a lambda-defined listener which we could not resolve the generic event type for
|
||||
Log logger = LogFactory.getLog(getClass());
|
||||
if (logger.isDebugEnabled()) {
|
||||
|
||||
Reference in New Issue
Block a user