Skip to content

Conversation

mxsm
Copy link
Contributor

@mxsm mxsm commented Apr 29, 2023

Fix #560
Optimize BaseCloudEvent#readExtensions method

writer.withContextAttribute(entry.getKey(), (byte[]) entry.getValue());
Object value = entry.getValue();
if (value instanceof String || value instanceof Number || value instanceof Boolean || value instanceof URI) {
writer.withContextAttribute(entry.getKey(), value.toString());
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Using the .toString() is not equivalent to previous implementation that was using typed methods.

The original issue is not clear what the optimization is?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

2 participants