Skip to content

Commit b23a88e

Browse files
committed
GH-4057: Fix compilation warnings
Fixes #4057 Signed-off-by: Soby Chacko <[email protected]>
1 parent 81c0195 commit b23a88e

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

spring-kafka/src/main/java/org/springframework/kafka/listener/adapter/MessagingMessageListenerAdapter.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -513,6 +513,7 @@ private RuntimeException checkAckArg(@Nullable Acknowledgment acknowledgment, Me
513513
* @param source the source data for the method invocation - e.g.
514514
* {@code o.s.messaging.Message<?>}; may be null
515515
*/
516+
@SuppressWarnings("try")
516517
protected void handleResult(Object resultArg, Object request, @Nullable Acknowledgment acknowledgment,
517518
@Nullable Consumer<?, ?> consumer, @Nullable Message<?> source) {
518519
final Observation observation = getCurrentObservation();
@@ -550,7 +551,7 @@ else if (!(result instanceof CompletableFuture<?>)) {
550551
}
551552

552553
completableFutureResult.whenComplete((r, t) -> {
553-
try (var scope = observation.openScope()) {
554+
try (var ignored = observation.openScope()) {
554555
if (t == null) {
555556
asyncSuccess(r, replyTopic, source, messageReturnType);
556557
if (isAsyncReplies()) {

0 commit comments

Comments
 (0)