Skip to content

Conversation

@matejvasek
Copy link
Contributor

Signed-off-by: Matej Vasek mvasek@redhat.com

Signed-off-by: Matej Vasek <mvasek@redhat.com>

PojoCloudEventData<MyPojo> mappedData = CloudEventUtils.mapData(
event,
PojoCloudEventDataMapper.from(objectMapper, new TypeReference<MyPojo>() {
Copy link
Member

Choose a reason for hiding this comment

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

More than modifying this test, can you create a new one for class?

return new PojoCloudEventData<>(mapper, value, bytes);
}

public static <T> PojoCloudEventDataMapper<T> from(ObjectMapper mapper, TypeReference<T> target) {
Copy link
Member

Choose a reason for hiding this comment

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

Can you add javadoc to this method and the other one, explaining a bit the difference between class and typereference?

@slinkydeveloper slinkydeveloper added the enhancement New feature or request label Nov 12, 2020
@slinkydeveloper slinkydeveloper added this to the 2.0.0.CR1 milestone Nov 12, 2020
@slinkydeveloper
Copy link
Member

@matejvasek Can you fix the dco?

Signed-off-by: Matej Vasek <mvasek@redhat.com>
Signed-off-by: Matej Vasek <mvasek@redhat.com>
Signed-off-by: Matej Vasek <mvasek@redhat.com>
@slinkydeveloper slinkydeveloper merged commit b1aa399 into cloudevents:master Nov 13, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants