Gracefully skip non-assignable reactive lambda callbacks on Java 18+.
Closes #2808, #2809.
This commit is contained in:
committed by
Oliver Drotbohm
parent
e1ec982e88
commit
a257a0399a
@@ -37,6 +37,7 @@ import org.springframework.util.ReflectionUtils;
|
||||
*
|
||||
* @author Mark Paluch
|
||||
* @author Christoph Strobl
|
||||
* @author Michael J. Simons
|
||||
*/
|
||||
class DefaultReactiveEntityCallbacks implements ReactiveEntityCallbacks {
|
||||
|
||||
@@ -112,7 +113,7 @@ class DefaultReactiveEntityCallbacks implements ReactiveEntityCallbacks {
|
||||
|
||||
throw new IllegalArgumentException(
|
||||
String.format("Callback invocation on %s returned null value for %s", callback.getClass(), entity));
|
||||
} catch (ClassCastException ex) {
|
||||
} catch (IllegalArgumentException | ClassCastException ex) {
|
||||
|
||||
String msg = ex.getMessage();
|
||||
if (msg == null || EntityCallbackInvoker.matchesClassCastMessage(msg, entity.getClass())) {
|
||||
|
||||
Reference in New Issue
Block a user