GH-1234 Add delegation to existing shouldFailIfCantConvert(..)

This ensures that if Throwable is not provided it can fal back to already implemented method
This commit is contained in:
Oleg Zhurakousky
2025-04-04 18:21:21 +02:00
parent 837b72055a
commit aec25f6ec7

View File

@@ -44,6 +44,9 @@ public interface MessageConverterHelper {
* @return true if conversion failure must be considered fatal.
*/
default boolean shouldFailIfCantConvert(Message<?> message, Throwable t) {
if (t == null) {
return this.shouldFailIfCantConvert(message);
}
return false;
}