diff --git a/core/deployment/src/main/java/io/quarkus/deployment/builditem/GeneratedClassBuildItem.java b/core/deployment/src/main/java/io/quarkus/deployment/builditem/GeneratedClassBuildItem.java index 00fb49e11a23b..eb3a1df5f3968 100644 --- a/core/deployment/src/main/java/io/quarkus/deployment/builditem/GeneratedClassBuildItem.java +++ b/core/deployment/src/main/java/io/quarkus/deployment/builditem/GeneratedClassBuildItem.java @@ -18,7 +18,7 @@ public GeneratedClassBuildItem(boolean applicationClass, String name, byte[] cla throw new IllegalArgumentException("Name cannot start with '/':" + name); } this.applicationClass = applicationClass; - this.name = name; + this.name = name.replace('/', '.'); this.classData = classData; this.source = source; } @@ -39,4 +39,7 @@ public String getSource() { return source; } + public String toString() { + return "GeneratedClassBuildItem[" + name + "]"; + } } diff --git a/extensions/smallrye-reactive-messaging-kafka/deployment/src/test/java/io/quarkus/smallrye/reactivemessaging/kafka/deployment/DefaultSerdeConfigTest.java b/extensions/smallrye-reactive-messaging-kafka/deployment/src/test/java/io/quarkus/smallrye/reactivemessaging/kafka/deployment/DefaultSerdeConfigTest.java index cc971ba643bcb..c8620fbaae5f4 100644 --- a/extensions/smallrye-reactive-messaging-kafka/deployment/src/test/java/io/quarkus/smallrye/reactivemessaging/kafka/deployment/DefaultSerdeConfigTest.java +++ b/extensions/smallrye-reactive-messaging-kafka/deployment/src/test/java/io/quarkus/smallrye/reactivemessaging/kafka/deployment/DefaultSerdeConfigTest.java @@ -132,10 +132,12 @@ boolean isKafkaConnector(List list, boolean in assertThat(generated) .extracting(GeneratedClassBuildItem::getName) + .extracting(n -> n.replace('/', '.')) .allSatisfy(s -> assertThat(generatedNames).satisfiesOnlyOnce(c -> c.apply(s))); assertThat(reflective) .flatExtracting(ReflectiveClassBuildItem::getClassNames) + .extracting(n -> n.replace('/', '.')) .allSatisfy(s -> assertThat(reflectiveNames).satisfiesOnlyOnce(c -> c.apply(s))); } finally { // must not leak the lazily-initialized Config instance associated to the system classloader