-
Notifications
You must be signed in to change notification settings - Fork 1.1k
GH-10083: Add NullAway core package #10397
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
Merged
artembilan
merged 2 commits into
spring-projects:main
from
cppwfs:GH-10083-core-package
Sep 10, 2025
Merged
Changes from 1 commit
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -114,13 +114,11 @@ public void setReadOnlyHeaders(String... readOnlyHeaders) { | |
} | ||
} | ||
|
||
@Nullable | ||
public Long getExpirationDate() { | ||
public @Nullable Long getExpirationDate() { | ||
return getHeader(EXPIRATION_DATE, Long.class); | ||
} | ||
|
||
@Nullable | ||
public Object getCorrelationId() { | ||
public @Nullable Object getCorrelationId() { | ||
return getHeader(CORRELATION_ID); | ||
} | ||
|
||
|
@@ -134,8 +132,7 @@ public int getSequenceSize() { | |
return (sequenceSize != null ? sequenceSize.intValue() : 0); | ||
} | ||
|
||
@Nullable | ||
public Integer getPriority() { | ||
public @Nullable Integer getPriority() { | ||
Number priority = getHeader(PRIORITY, Number.class); | ||
return (priority != null ? priority.intValue() : null); | ||
} | ||
|
@@ -149,8 +146,7 @@ public Integer getPriority() { | |
* @return the {@link Closeable}. | ||
* @since 4.3 | ||
*/ | ||
@Nullable | ||
public Closeable getCloseableResource() { | ||
public @Nullable Closeable getCloseableResource() { | ||
return getHeader(CLOSEABLE_RESOURCE, Closeable.class); | ||
} | ||
|
||
|
@@ -159,8 +155,7 @@ public Closeable getCloseableResource() { | |
* @return the callback. | ||
* @since 5.0.1 | ||
*/ | ||
@Nullable | ||
public AcknowledgmentCallback getAcknowledgmentCallback() { | ||
public @Nullable AcknowledgmentCallback getAcknowledgmentCallback() { | ||
return getHeader(ACKNOWLEDGMENT_CALLBACK, AcknowledgmentCallback.class); | ||
} | ||
|
||
|
@@ -170,8 +165,7 @@ public AcknowledgmentCallback getAcknowledgmentCallback() { | |
* @return the delivery attempt. | ||
* @since 5.0.1 | ||
*/ | ||
@Nullable | ||
public AtomicInteger getDeliveryAttempt() { | ||
public @Nullable AtomicInteger getDeliveryAttempt() { | ||
return getHeader(DELIVERY_ATTEMPT, AtomicInteger.class); | ||
} | ||
|
||
|
@@ -182,8 +176,7 @@ public AtomicInteger getDeliveryAttempt() { | |
* @since 5.1.6 | ||
*/ | ||
@SuppressWarnings("unchecked") | ||
@Nullable | ||
public <T> T getSourceData() { | ||
public @Nullable <T> T getSourceData() { | ||
return (T) getHeader(SOURCE_DATA); | ||
} | ||
|
||
|
@@ -192,14 +185,12 @@ public <T> T getSourceData() { | |
* @return the {@link ContextView} header if present. | ||
* @since 6.0.5 | ||
*/ | ||
@Nullable | ||
public ContextView getReactorContext() { | ||
public @Nullable ContextView getReactorContext() { | ||
return getHeader(REACTOR_CONTEXT, ContextView.class); | ||
} | ||
|
||
@SuppressWarnings("unchecked") | ||
@Nullable | ||
public <T> T getHeader(String key, Class<T> type) { | ||
public @Nullable <T> T getHeader(String key, Class<T> type) { | ||
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. DITTO |
||
Object value = getHeader(key); | ||
if (value == null) { | ||
return null; | ||
|
@@ -212,7 +203,7 @@ public <T> T getHeader(String key, Class<T> type) { | |
} | ||
|
||
@Override | ||
protected void verifyType(String headerName, Object headerValue) { | ||
protected void verifyType(@Nullable String headerName, @Nullable Object headerValue) { | ||
if (headerName != null && headerValue != null) { | ||
super.verifyType(headerName, headerValue); | ||
if (IntegrationMessageHeaderAccessor.EXPIRATION_DATE.equals(headerName)) { | ||
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
I believe this has to be next to the
T
, the exact return type, not generic definition