From 168a5159b8ae176950c3ea5bfb7df98b3774a79b Mon Sep 17 00:00:00 2001 From: Juergen Hoeller Date: Thu, 25 Apr 2019 14:31:57 +0200 Subject: [PATCH] Log ClassCastException from lambda-defined listener at trace level Closes gh-22834 --- .../context/event/SimpleApplicationEventMulticaster.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/spring-context/src/main/java/org/springframework/context/event/SimpleApplicationEventMulticaster.java b/spring-context/src/main/java/org/springframework/context/event/SimpleApplicationEventMulticaster.java index f46d65f290a..952113e88f9 100644 --- a/spring-context/src/main/java/org/springframework/context/event/SimpleApplicationEventMulticaster.java +++ b/spring-context/src/main/java/org/springframework/context/event/SimpleApplicationEventMulticaster.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2018 the original author or authors. + * Copyright 2002-2019 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -177,8 +177,8 @@ public class SimpleApplicationEventMulticaster extends AbstractApplicationEventM // Possibly a lambda-defined listener which we could not resolve the generic event type for // -> let's suppress the exception and just log a debug message. Log logger = LogFactory.getLog(getClass()); - if (logger.isDebugEnabled()) { - logger.debug("Non-matching event type for listener: " + listener, ex); + if (logger.isTraceEnabled()) { + logger.trace("Non-matching event type for listener: " + listener, ex); } } else {