-
Notifications
You must be signed in to change notification settings - Fork 167
Glue core & api #157
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Glue core & api #157
Conversation
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>
5d654a0 to
a07ebb0
Compare
core/src/main/java/io/cloudevents/builder/CloudEventBuilder.java
Outdated
Show resolved
Hide resolved
|
@slinkydeveloper nice! Happy to see the |
Signed-off-by: Francesco Guardiani <francescoguard@gmail.com>
| case V03: | ||
| return CloudEventBuilder.v03(); | ||
| } | ||
| return null; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Consider adding @Nullable
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe throw IllegallStateException then
There was a problem hiding this comment.
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
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
|
|
||
| default CloudEvent toEvent() throws MessageVisitException, IllegalStateException { | ||
| return this.visit(EventFormat::deserialize); | ||
| public static CloudEventVisitable toVisitable(CloudEvent event) { |
There was a problem hiding this comment.
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>
bsideup
left a comment
There was a problem hiding this 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>
|
@bsideup thanks for the quick review! |
|
I'll second Sergei. The |
|
great to see this, thanks @slinkydeveloper! |
Fix #156
Each commit represent one of the steps explained in #156.
Deprecates #147 and #150