-
Notifications
You must be signed in to change notification settings - Fork 174
Bumped to SpringBoot4, SpringFramework7 and JDK17 - same as #705, but with signed-ff commits #729
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
base: main
Are you sure you want to change the base?
Changes from all commits
d173218
a5fcde5
02c814c
d3d49a1
82d1948
27fe384
0fff72f
21ad859
21ba921
cc233be
431ad99
41f75be
8d2afda
a5e9fa0
a9aeace
6a81be3
b04b258
f4eb1bf
4ca78c6
c04dd42
53b911f
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
This file was deleted.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,2 +1,3 @@ | ||
| distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.6.3/apache-maven-3.6.3-bin.zip | ||
| wrapperUrl=https://repo.maven.apache.org/maven2/io/takari/maven-wrapper/0.5.6/maven-wrapper-0.5.6.jar | ||
| wrapperVersion=3.3.4 | ||
| distributionType=only-script | ||
| distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.9.11/apache-maven-3.9.11-bin.zip |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -54,16 +54,16 @@ public void readAttributes(CloudEventContextWriter writer) throws RuntimeExcepti | |
| public void readExtensions(CloudEventContextWriter writer) throws RuntimeException { | ||
| for (String key : event.getExtensionNames()) { | ||
| Object value = event.getExtension(key); | ||
| if (value instanceof String) { | ||
| writer.withContextAttribute(key, (String) value); | ||
| } else if (value instanceof Number) { | ||
| writer.withContextAttribute(key, (Number) value); | ||
| } else if (value instanceof Boolean) { | ||
| writer.withContextAttribute(key, (Boolean) value); | ||
| } else if (value instanceof URI) { | ||
| writer.withContextAttribute(key, (URI) value); | ||
| } else if (value instanceof OffsetDateTime) { | ||
| writer.withContextAttribute(key, (OffsetDateTime) value); | ||
| if (value instanceof String string) { | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This code can be refactor to Pattern Matching with a |
||
| writer.withContextAttribute(key, string); | ||
| } else if (value instanceof Number number) { | ||
| writer.withContextAttribute(key, number); | ||
| } else if (value instanceof Boolean boolean1) { | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Rename this |
||
| writer.withContextAttribute(key, boolean1); | ||
| } else if (value instanceof URI rI) { | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Rename |
||
| writer.withContextAttribute(key, rI); | ||
| } else if (value instanceof OffsetDateTime time) { | ||
| writer.withContextAttribute(key, time); | ||
| } else { | ||
| // This should never happen because we build that map only through our builders | ||
| throw new IllegalStateException("Illegal value inside extensions map: " + key + " " + value); | ||
|
|
||
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.
Even thought this variable is design to be a key in a map, I suggest to rename it as
extensionNameorextensionorname