Skip to content

Commit 5896ec2

Browse files
Remove useless comment and code.
Signed-off-by: Sanghyeok An <[email protected]>
1 parent 0c75fc7 commit 5896ec2

File tree

2 files changed

+8
-11
lines changed

2 files changed

+8
-11
lines changed

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

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,6 @@ public abstract class AbstractMessageListenerContainer<K, V>
115115

116116
private int topicCheckTimeout = DEFAULT_TOPIC_CHECK_TIMEOUT;
117117

118-
// TODO: HERE ASH
119118
private List<RecordInterceptor<K, V>> recordInterceptors = new ArrayList<>();
120119

121120
private @Nullable BatchInterceptor<K, V> batchInterceptor;

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

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2853,19 +2853,17 @@ private void commitOffsetsIfNeededAfterHandlingError(final ConsumerRecord<K, V>
28532853
}
28542854

28552855
private void recordInterceptAfter(ConsumerRecord<K, V> records, @Nullable Exception exception) {
2856-
if (!this.commonRecordInterceptors.isEmpty()) {
2857-
try {
2858-
if (exception == null) {
2859-
this.commonRecordInterceptors.forEach(interceptor -> interceptor.success(records, this.consumer));
2860-
}
2861-
else {
2862-
this.commonRecordInterceptors.forEach(interceptor -> interceptor.failure(records, exception, this.consumer));
2863-
}
2856+
try {
2857+
if (exception == null) {
2858+
this.commonRecordInterceptors.forEach(interceptor -> interceptor.success(records, this.consumer));
28642859
}
2865-
catch (Exception e) {
2866-
this.logger.error(e, "RecordInterceptor.success/failure threw an exception");
2860+
else {
2861+
this.commonRecordInterceptors.forEach(interceptor -> interceptor.failure(records, exception, this.consumer));
28672862
}
28682863
}
2864+
catch (Exception e) {
2865+
this.logger.error(e, "RecordInterceptor.success/failure threw an exception");
2866+
}
28692867
}
28702868

28712869
private void invokeOnMessage(final ConsumerRecord<K, V> cRecord) {

0 commit comments

Comments
 (0)