Skip to content

Commit 168a515

Browse files
committed
Log ClassCastException from lambda-defined listener at trace level
Closes gh-22834
1 parent 0cfab87 commit 168a515

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

spring-context/src/main/java/org/springframework/context/event/SimpleApplicationEventMulticaster.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2002-2018 the original author or authors.
2+
* Copyright 2002-2019 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -177,8 +177,8 @@ private void doInvokeListener(ApplicationListener listener, ApplicationEvent eve
177177
// Possibly a lambda-defined listener which we could not resolve the generic event type for
178178
// -> let's suppress the exception and just log a debug message.
179179
Log logger = LogFactory.getLog(getClass());
180-
if (logger.isDebugEnabled()) {
181-
logger.debug("Non-matching event type for listener: " + listener, ex);
180+
if (logger.isTraceEnabled()) {
181+
logger.trace("Non-matching event type for listener: " + listener, ex);
182182
}
183183
}
184184
else {

0 commit comments

Comments
 (0)