Skip to content

Commit 0d88e26

Browse files
NathanQingyangXuartembilan
authored andcommitted
Fix KafkaAvroBeanRegAotProces constant reference
The `KafkaAvroBeanRegistrationAotProcessor.CONSUMER_RECORDS_CLASS_NAME` refers to the `ConsumerRecord` class by mistake. * Use an expected `ConsumerRecords` class for the `CONSUMER_RECORDS_CLASS_NAME` constant. **Cherry-pick to `3.0.x`** (cherry picked from commit b9edbfd)
1 parent 0565285 commit 0d88e26

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

spring-kafka/src/main/java/org/springframework/kafka/aot/KafkaAvroBeanRegistrationAotProcessor.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323
import java.util.Set;
2424

2525
import org.apache.kafka.clients.consumer.ConsumerRecord;
26+
import org.apache.kafka.clients.consumer.ConsumerRecords;
2627

2728
import org.springframework.aot.hint.MemberCategory;
2829
import org.springframework.aot.hint.ReflectionHints;
@@ -47,7 +48,7 @@ public class KafkaAvroBeanRegistrationAotProcessor implements BeanRegistrationAo
4748

4849
private static final String CONSUMER_RECORD_CLASS_NAME = ConsumerRecord.class.getName();
4950

50-
private static final String CONSUMER_RECORDS_CLASS_NAME = ConsumerRecord.class.getName();
51+
private static final String CONSUMER_RECORDS_CLASS_NAME = ConsumerRecords.class.getName();
5152

5253
private static final String AVRO_GENERATED_CLASS_NAME = "org.apache.avro.specific.AvroGenerated";
5354

0 commit comments

Comments
 (0)