Skip to content

Commit 9066598

Browse files
garyrussellartembilan
authored andcommitted
Add Properties to Deprecation Annotations
Indicate since and removal. Also - remove deprecations from 2.8 (except those related to error handlers) - remove `RetryingMessageListenerAdapter` which was temporarily reinstated for SIK - remove `TransactionSupport` - no longer used anywhere
1 parent 0da801f commit 9066598

26 files changed

+28
-301
lines changed

spring-kafka/src/main/java/org/springframework/kafka/config/AbstractKafkaListenerContainerFactory.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -213,7 +213,7 @@ public void setReplyTemplate(KafkaTemplate<?, ?> replyTemplate) {
213213
* @deprecated in favor of {@link #setCommonErrorHandler(CommonErrorHandler)}
214214
* @see #setCommonErrorHandler(CommonErrorHandler)
215215
*/
216-
@Deprecated
216+
@Deprecated(since = "2.8", forRemoval = true) // in 3.1
217217
public void setErrorHandler(org.springframework.kafka.listener.ErrorHandler errorHandler) {
218218
this.errorHandler = errorHandler;
219219
}
@@ -225,7 +225,7 @@ public void setErrorHandler(org.springframework.kafka.listener.ErrorHandler erro
225225
* @deprecated in favor of {@link #setCommonErrorHandler(CommonErrorHandler)}
226226
* @see #setCommonErrorHandler(CommonErrorHandler)
227227
*/
228-
@Deprecated
228+
@Deprecated(since = "2.8", forRemoval = true) // in 3.1
229229
public void setBatchErrorHandler(org.springframework.kafka.listener.BatchErrorHandler errorHandler) {
230230
this.errorHandler = errorHandler;
231231
}

spring-kafka/src/main/java/org/springframework/kafka/core/DefaultKafkaProducerFactory.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -440,7 +440,7 @@ public boolean isProducerPerThread() {
440440
* {@code org.springframework.kafka.listener.ContainerProperties.EOSMode#V1} is no
441441
* longer supported.
442442
*/
443-
@Deprecated
443+
@Deprecated(since = "3.0", forRemoval = true) // in 3.1
444444
public void setProducerPerConsumerPartition(boolean producerPerConsumerPartition) {
445445
}
446446

@@ -452,7 +452,7 @@ public void setProducerPerConsumerPartition(boolean producerPerConsumerPartition
452452
* {@code org.springframework.kafka.listener.ContainerProperties.EOSMode#V1} is no
453453
* longer supported.
454454
*/
455-
@Deprecated
455+
@Deprecated(since = "3.0", forRemoval = true) // in 3.1
456456
@Override
457457
public boolean isProducerPerConsumerPartition() {
458458
return false;

spring-kafka/src/main/java/org/springframework/kafka/core/KafkaOperations2.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@
5050
* @since 2.9
5151
* @deprecated no longer needed; use {@code KafkaOperations}.
5252
*/
53-
@Deprecated
53+
@Deprecated(since = "3.0", forRemoval = true) // in 3.1
5454
public interface KafkaOperations2<K, V> {
5555

5656
/**

spring-kafka/src/main/java/org/springframework/kafka/core/ProducerFactory.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ default boolean transactionCapable() {
8484
* @since 1.3.8
8585
* @deprecated - no longer needed.
8686
*/
87-
@Deprecated
87+
@Deprecated(since = "3.0", forRemoval = true) // in 3.1
8888
default void closeProducerFor(String transactionIdSuffix) {
8989
}
9090

@@ -96,7 +96,7 @@ default void closeProducerFor(String transactionIdSuffix) {
9696
* {@code org.springframework.kafka.listener.ContainerProperties.EOSMode#V1} is no
9797
* longer supported.
9898
*/
99-
@Deprecated
99+
@Deprecated(since = "3.0", forRemoval = true) // in 3.1
100100
default boolean isProducerPerConsumerPartition() {
101101
return false;
102102
}

spring-kafka/src/main/java/org/springframework/kafka/listener/AbstractMessageListenerContainer.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -214,7 +214,7 @@ public ApplicationEventPublisher getApplicationEventPublisher() {
214214
* @deprecated in favor of {@link #setCommonErrorHandler(CommonErrorHandler)}
215215
* @see #setCommonErrorHandler(CommonErrorHandler)
216216
*/
217-
@Deprecated
217+
@Deprecated(since = "2.8", forRemoval = true) // in 3.1
218218
public void setErrorHandler(ErrorHandler errorHandler) {
219219
this.errorHandler = errorHandler;
220220
}
@@ -226,7 +226,7 @@ public void setErrorHandler(ErrorHandler errorHandler) {
226226
* @deprecated in favor of {@link #setCommonErrorHandler(CommonErrorHandler)}
227227
* @see #setCommonErrorHandler(CommonErrorHandler)
228228
*/
229-
@Deprecated
229+
@Deprecated(since = "2.8", forRemoval = true) // in 3.1
230230
public void setGenericErrorHandler(@Nullable GenericErrorHandler<?> errorHandler) {
231231
this.errorHandler = errorHandler;
232232
}
@@ -238,7 +238,7 @@ public void setGenericErrorHandler(@Nullable GenericErrorHandler<?> errorHandler
238238
* @deprecated in favor of {@link #setCommonErrorHandler(CommonErrorHandler)}
239239
* @see #setCommonErrorHandler(CommonErrorHandler)
240240
*/
241-
@Deprecated
241+
@Deprecated(since = "2.8", forRemoval = true) // in 3.1
242242
public void setBatchErrorHandler(BatchErrorHandler errorHandler) {
243243
this.errorHandler = errorHandler;
244244
}
@@ -250,7 +250,7 @@ public void setBatchErrorHandler(BatchErrorHandler errorHandler) {
250250
* @deprecated in favor of {@link #getCommonErrorHandler()}
251251
* @see #getCommonErrorHandler()
252252
*/
253-
@Deprecated
253+
@Deprecated(since = "2.8", forRemoval = true) // in 3.1
254254
@Nullable
255255
public GenericErrorHandler<?> getGenericErrorHandler() {
256256
return this.errorHandler;

spring-kafka/src/main/java/org/springframework/kafka/listener/BatchErrorHandler.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
* @since 1.1
3232
* @deprecated in favor of {@link CommonErrorHandler}.
3333
*/
34-
@Deprecated
34+
@Deprecated(since = "2.8", forRemoval = true) // in 3.1
3535
public interface BatchErrorHandler extends GenericErrorHandler<ConsumerRecords<?, ?>> {
3636

3737
/**

spring-kafka/src/main/java/org/springframework/kafka/listener/CommonContainerStoppingErrorHandler.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ public void setStopContainerAbnormally(boolean stopContainerAbnormally) {
7171
}
7272

7373
@Override
74-
@Deprecated
74+
@Deprecated(since = "2.9", forRemoval = true) // in 3.1
7575
public boolean remainingRecords() {
7676
return true;
7777
}

spring-kafka/src/main/java/org/springframework/kafka/listener/CommonErrorHandler.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ public interface CommonErrorHandler extends DeliveryAttemptAware {
4747
* @see #handleRecord(Exception, ConsumerRecord, Consumer, MessageListenerContainer)
4848
* @see #handleRemaining(Exception, List, Consumer, MessageListenerContainer)
4949
*/
50-
@Deprecated
50+
@Deprecated(since = "2.9", forRemoval = true) // in 3.1
5151
default boolean remainingRecords() {
5252
return false;
5353
}
@@ -97,7 +97,7 @@ default void handleOtherException(Exception thrownException, Consumer<?, ?> cons
9797
* {@link #handleOne(Exception, ConsumerRecord, Consumer, MessageListenerContainer)}.
9898
* @see #remainingRecords()
9999
*/
100-
@Deprecated
100+
@Deprecated(since = "2.9", forRemoval = true) // in 3.1
101101
default void handleRecord(Exception thrownException, ConsumerRecord<?, ?> record, Consumer<?, ?> consumer,
102102
MessageListenerContainer container) {
103103

spring-kafka/src/main/java/org/springframework/kafka/listener/CommonLoggingErrorHandler.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ public void setAckAfterHandle(boolean ackAfterHandle) {
4848
}
4949

5050
@Override
51-
@Deprecated
51+
@Deprecated(since = "2.9", forRemoval = true) // in 3.1
5252
public void handleRecord(Exception thrownException, ConsumerRecord<?, ?> record, Consumer<?, ?> consumer,
5353
MessageListenerContainer container) {
5454

spring-kafka/src/main/java/org/springframework/kafka/listener/ConsumerAwareBatchErrorHandler.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
* @deprecated in favor of {@link CommonErrorHandler}.
3131
*
3232
*/
33-
@Deprecated
33+
@Deprecated(since = "2.8", forRemoval = true) // in 3.1
3434
@FunctionalInterface
3535
public interface ConsumerAwareBatchErrorHandler extends BatchErrorHandler {
3636

0 commit comments

Comments
 (0)