Skip to content

Conversation

@slinkydeveloper
Copy link
Member

@slinkydeveloper slinkydeveloper commented May 29, 2020

Fix #156

Each commit represent one of the steps explained in #156.

Deprecates #147 and #150

Signed-off-by: Francesco Guardiani <francescoguard@gmail.com>
Signed-off-by: Francesco Guardiani <francescoguard@gmail.com>
Signed-off-by: Francesco Guardiani <francescoguard@gmail.com>
Signed-off-by: Francesco Guardiani <francescoguard@gmail.com>
Signed-off-by: Francesco Guardiani <francescoguard@gmail.com>
Signed-off-by: Francesco Guardiani <francescoguard@gmail.com>
@bsideup
Copy link
Contributor

bsideup commented May 29, 2020

@slinkydeveloper nice! Happy to see the api module untouched 👍

Signed-off-by: Francesco Guardiani <francescoguard@gmail.com>
case V03:
return CloudEventBuilder.v03();
}
return null;
Copy link
Contributor

Choose a reason for hiding this comment

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

Consider adding @Nullable

Copy link
Member Author

@slinkydeveloper slinkydeveloper May 29, 2020

Choose a reason for hiding this comment

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

But that's a condition that can never happen, SpecVersion or is V1 or is V03. SpecVersion version on the other hand should be non null

Copy link
Member Author

@slinkydeveloper slinkydeveloper May 29, 2020

Choose a reason for hiding this comment

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

After this pr, we should review all these annotation usages in all modules, I'm quite sure there are some places where we miss these

Copy link
Contributor

Choose a reason for hiding this comment

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

Maybe throw IllegallStateException then

Copy link
Member Author

Choose a reason for hiding this comment

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

The only way this could happen is that there is misalignment between core and api versions, let me explicit it

Copy link
Member Author

Choose a reason for hiding this comment

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

@slinkydeveloper slinkydeveloper marked this pull request as ready for review May 29, 2020 11:30

default CloudEvent toEvent() throws MessageVisitException, IllegalStateException {
return this.visit(EventFormat::deserialize);
public static CloudEventVisitable toVisitable(CloudEvent event) {
Copy link
Contributor

Choose a reason for hiding this comment

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

👍

Signed-off-by: Francesco Guardiani <francescoguard@gmail.com>
@slinkydeveloper
Copy link
Member Author

@bsideup & @olegz can you review this?

Copy link
Contributor

@bsideup bsideup left a comment

Choose a reason for hiding this comment

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

Nice! I did a (very) quick review of core and did not find anything that would not make me approve it, especially given that the api module was not touched 👍

The package change is also nice 💯

From the PoV of api module consumer, this change looks good, thanks! 🎉

Signed-off-by: Francesco Guardiani <francescoguard@gmail.com>
@duglin
Copy link
Contributor

duglin commented May 29, 2020

@bsideup thanks for the quick review!

@olegz
Copy link
Contributor

olegz commented May 29, 2020

I'll second Sergei. The api module is clean and this PR reinforces its clear separation with core.
Approved

@slinkydeveloper slinkydeveloper merged commit c4f2902 into cloudevents:master May 29, 2020
@slinkydeveloper slinkydeveloper deleted the glue_core_api branch May 29, 2020 13:12
@markfisher
Copy link

great to see this, thanks @slinkydeveloper!

@slinkydeveloper slinkydeveloper added this to the 2.0.0-milestone1 milestone Jun 18, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Plan for glue-ing core to api

5 participants