package io.quarkus.smallrye.reactivemessaging.kafka.deployment;

import io.quarkus.deployment.annotations.BuildProducer;
import io.quarkus.deployment.annotations.BuildStep;
import io.quarkus.deployment.builditem.CombinedIndexBuildItem;
import io.quarkus.deployment.builditem.substrate.ReflectiveClassBuildItem;
import io.vertx.kafka.client.serialization.BufferDeserializer;
import io.vertx.kafka.client.serialization.BufferSerializer;
import io.vertx.kafka.client.serialization.JsonArrayDeserializer;
import io.vertx.kafka.client.serialization.JsonArraySerializer;
import io.vertx.kafka.client.serialization.JsonObjectDeserializer;
import io.vertx.kafka.client.serialization.JsonObjectSerializer;

public class KafkaCodecProcessor {

    static final Class<?>[] BUILT_INS = {
            JsonObjectSerializer.class,
            BufferSerializer.class,
            JsonArraySerializer.class,

            JsonObjectDeserializer.class,
            BufferDeserializer.class,
            JsonArrayDeserializer.class,
    };

    @BuildStep
    public void build(CombinedIndexBuildItem indexBuildItem, BuildProducer<ReflectiveClassBuildItem> reflectiveClass) {

        for (Class<?> s : BUILT_INS) {
            reflectiveClass.produce(new ReflectiveClassBuildItem(true, false, s.toString()));
        }
    }
}

@@ -170,71 +170,8 @@
 ep;%0A
-import io.quarkus.deployment.builditem.CombinedIndexBuildItem;%0A
 impo
@@ -992,47 +992,8 @@
 ild(
-CombinedIndexBuildItem indexBuildItem, 
 Buil
@@ -1047,17 +1047,16 @@
 lass) %7B%0A
-%0A
         
@@ -1170,16 +1170,15 @@
 , s.
-toString
+getName
 ()))

Fix #2944 - Fix the inclusion of the built-in serializers and deserializers