davsclaus commented on code in PR #23021:
URL: https://github.com/apache/camel/pull/23021#discussion_r3206813263
##########
core/camel-api/src/main/java/org/apache/camel/spi/BulkTypeConverters.java:
##########
@@ -65,7 +68,8 @@ public interface BulkTypeConverters extends Ordered,
TypeConverter {
* @param value the value to be converted
* @return the converted value, or <tt>null</tt> if not possible to
convert
*/
- default <T> T tryConvertTo(Class<?> from, Class<T> to, Exchange exchange,
Object value) throws TypeConversionException {
+ default <T> @Nullable T tryConvertTo(Class<?> from, Class<T> to, @Nullable
Exchange exchange, @Nullable Object value)
Review Comment:
the value is not null - you cannot converter a null value so this should be
changed
##########
core/camel-api/src/main/java/org/apache/camel/spi/BulkTypeConverters.java:
##########
@@ -53,7 +55,8 @@ public interface BulkTypeConverters extends Ordered,
TypeConverter {
* return null.
* @throws TypeConversionException is thrown if error during type
conversion
*/
- <T> T convertTo(Class<?> from, Class<T> to, Exchange exchange, Object
value) throws TypeConversionException;
+ <T> @Nullable T convertTo(Class<?> from, Class<T> to, @Nullable Exchange
exchange, @Nullable Object value)
Review Comment:
the value is not null - you cannot converter a null value so this should be
changed
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]