|
1 | 1 | /*
|
2 |
| - * Copyright 2016-2024 the original author or authors. |
| 2 | + * Copyright 2016-2025 the original author or authors. |
3 | 3 | *
|
4 | 4 | * Licensed under the Apache License, Version 2.0 (the "License");
|
5 | 5 | * you may not use this file except in compliance with the License.
|
|
64 | 64 | import org.apache.kafka.common.errors.WakeupException;
|
65 | 65 | import org.apache.kafka.common.serialization.IntegerDeserializer;
|
66 | 66 | import org.assertj.core.api.InstanceOfAssertFactories;
|
| 67 | +import org.jspecify.annotations.NonNull; |
| 68 | +import org.jspecify.annotations.Nullable; |
67 | 69 | import org.junit.jupiter.api.BeforeAll;
|
68 | 70 | import org.junit.jupiter.api.Test;
|
69 | 71 | import org.junit.jupiter.params.ParameterizedTest;
|
|
109 | 111 | import org.springframework.kafka.test.utils.ContainerTestUtils;
|
110 | 112 | import org.springframework.kafka.test.utils.KafkaTestUtils;
|
111 | 113 | import org.springframework.kafka.transaction.KafkaAwareTransactionManager;
|
112 |
| -import org.springframework.lang.NonNull; |
113 |
| -import org.springframework.lang.Nullable; |
114 | 114 | import org.springframework.scheduling.concurrent.ThreadPoolTaskScheduler;
|
115 | 115 | import org.springframework.util.backoff.FixedBackOff;
|
116 | 116 |
|
@@ -3845,8 +3845,7 @@ public void onMessage(ConsumerRecord<Integer, String> data) {
|
3845 | 3845 | RecordInterceptor<Integer, String> recordInterceptor = spy(new RecordInterceptor<Integer, String>() {
|
3846 | 3846 |
|
3847 | 3847 | @Override
|
3848 |
| - @NonNull |
3849 |
| - public ConsumerRecord<Integer, String> intercept(ConsumerRecord<Integer, String> record, |
| 3848 | + public @NonNull ConsumerRecord<Integer, String> intercept(ConsumerRecord<Integer, String> record, |
3850 | 3849 | Consumer<Integer, String> consumer) {
|
3851 | 3850 |
|
3852 | 3851 | return record;
|
@@ -3934,8 +3933,7 @@ public void testInvokeRecordInterceptorAllSkipped(AckMode ackMode, boolean early
|
3934 | 3933 | RecordInterceptor<Integer, String> recordInterceptor = spy(new RecordInterceptor<Integer, String>() {
|
3935 | 3934 |
|
3936 | 3935 | @Override
|
3937 |
| - @Nullable |
3938 |
| - public ConsumerRecord<Integer, String> intercept(ConsumerRecord<Integer, String> record, |
| 3936 | + public @Nullable ConsumerRecord<Integer, String> intercept(ConsumerRecord<Integer, String> record, |
3939 | 3937 | Consumer<Integer, String> consumer) {
|
3940 | 3938 |
|
3941 | 3939 | return null;
|
@@ -4024,8 +4022,7 @@ public void testInvokeBatchInterceptorAllSkipped(boolean early) throws Exception
|
4024 | 4022 | BatchInterceptor<Integer, String> interceptor = spy(new BatchInterceptor<Integer, String>() {
|
4025 | 4023 |
|
4026 | 4024 | @Override
|
4027 |
| - @Nullable |
4028 |
| - public ConsumerRecords<Integer, String> intercept(ConsumerRecords<Integer, String> records, |
| 4025 | + public @Nullable ConsumerRecords<Integer, String> intercept(ConsumerRecords<Integer, String> records, |
4029 | 4026 | Consumer<Integer, String> consumer) {
|
4030 | 4027 |
|
4031 | 4028 | return null;
|
@@ -4090,8 +4087,7 @@ public void onMessage(ConsumerRecord<Integer, String> data) {
|
4090 | 4087 | RecordInterceptor<Integer, String> recordInterceptor = spy(new RecordInterceptor<Integer, String>() {
|
4091 | 4088 |
|
4092 | 4089 | @Override
|
4093 |
| - @NonNull |
4094 |
| - public ConsumerRecord<Integer, String> intercept(ConsumerRecord<Integer, String> record, |
| 4090 | + public @NonNull ConsumerRecord<Integer, String> intercept(ConsumerRecord<Integer, String> record, |
4095 | 4091 | Consumer<Integer, String> consumer) {
|
4096 | 4092 |
|
4097 | 4093 | return record;
|
|
0 commit comments