Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}

Expand All @@ -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);
}
Expand All @@ -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);
}

Expand All @@ -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);
}

Expand All @@ -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);
}

Expand All @@ -182,8 +176,7 @@ public AtomicInteger getDeliveryAttempt() {
* @since 5.1.6
*/
@SuppressWarnings("unchecked")
@Nullable
public <T> T getSourceData() {
public <T> @Nullable T getSourceData() {
return (T) getHeader(SOURCE_DATA);
}

Expand All @@ -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 <T> @Nullable T getHeader(String key, Class<T> type) {
Object value = getHeader(key);
if (value == null) {
return null;
Expand All @@ -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)) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
import java.util.List;
import java.util.Map;
import java.util.function.BiFunction;
import java.util.function.Consumer;
import java.util.function.Function;

import org.aopalliance.aop.Advice;
Expand Down Expand Up @@ -238,7 +239,7 @@ protected AggregatingMessageHandler createHandler() {
.acceptIfNotNull(this.expireGroupsUponCompletion, aggregator::setExpireGroupsUponCompletion)
.acceptIfNotNull(this.sendTimeout, aggregator::setSendTimeout)
.acceptIfNotNull(this.outputChannelName, aggregator::setOutputChannelName)
.acceptIfNotNull(this.lockRegistry, aggregator::setLockRegistry)
.acceptIfNotNull(this.lockRegistry, (Consumer<LockRegistry<?>>) aggregator::setLockRegistry)
.acceptIfNotNull(this.messageStore, aggregator::setMessageStore)
.acceptIfNotNull(obtainCorrelationStrategy(), aggregator::setCorrelationStrategy)
.acceptIfNotNull(obtainReleaseStrategy(), aggregator::setReleaseStrategy)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@
*
* Provides fundamental classes.
*/
@org.springframework.lang.NonNullApi
@org.jspecify.annotations.NullMarked
package org.springframework.integration;
Loading