-
Notifications
You must be signed in to change notification settings - Fork 166
Closed
Description
I was starting to log an issue about a NullPointerException in Milestone 4 when I discovered that @matejvasek had already fixed it in #259. I'd like to suggest that other similar NPEs could be avoided if we didn't allow the mapper in MessageReader.toEvent(CloudEventDataMapper) to be null. There's no reason to allow that, and it's just setting a trap. If you don't need to map the data then just supply an identity mapper. The no-arg MessageReader.toEvent() could call toEvent(data -> data) instead of toEvent(null). And a bunch of if (mapper == null) code could presumably be removed.
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request