-
Notifications
You must be signed in to change notification settings - Fork 38.7k
Closed
Labels
in: messagingIssues in messaging modules (jms, messaging)Issues in messaging modules (jms, messaging)type: enhancementA general enhancementA general enhancement
Milestone
Description
Stéphane Nicoll opened SPR-11817 and commented
MessageReceivingOperations.receiveAndConvert Javadoc states that the return value may be null
if the message could not be received, for example due to a timeout
However, both SimpleMessageConverter
and GenericMessageConverter
returns null
if an existing payload cannot be converted. This looks like we're ignoring any conversion issue and I see two things we should review:
- The converter implementation simply returns
null
if the conversion is not supported or if the requested target type is not assignable to the payload - In the receiver, it is impossible to make a difference between "no message" or "an existing message with a non convertible type"
Unless I am missing something, an exception should be thrown right the way if we can't convert it instead of returning null.
Affects: 3.2.9, 4.0.5
Metadata
Metadata
Assignees
Labels
in: messagingIssues in messaging modules (jms, messaging)Issues in messaging modules (jms, messaging)type: enhancementA general enhancementA general enhancement