diff --git a/extensions/qute/deployment/src/main/java/io/quarkus/qute/deployment/MessageBundleProcessor.java b/extensions/qute/deployment/src/main/java/io/quarkus/qute/deployment/MessageBundleProcessor.java index 25c84506b66e6..43d2d478ca30e 100644 --- a/extensions/qute/deployment/src/main/java/io/quarkus/qute/deployment/MessageBundleProcessor.java +++ b/extensions/qute/deployment/src/main/java/io/quarkus/qute/deployment/MessageBundleProcessor.java @@ -529,7 +529,7 @@ private String generateImplementation(ClassInfo defaultBundleInterface, String d } String targetPackage = DotNames.packageName(bundleInterface.name()); - String generatedName = targetPackage.replace('.', '/') + "/" + baseName + SUFFIX; + String generatedName = (targetPackage.isEmpty() ? "" : targetPackage.replace('.', '/') + "/") + baseName + SUFFIX; // MyMessages_Bundle implements MyMessages, Resolver Builder builder = ClassCreator.builder().classOutput(classOutput).className(generatedName) diff --git a/extensions/scheduler/deployment/src/main/java/io/quarkus/scheduler/deployment/SchedulerProcessor.java b/extensions/scheduler/deployment/src/main/java/io/quarkus/scheduler/deployment/SchedulerProcessor.java index 1d6f0f8584181..bc62a8e775737 100644 --- a/extensions/scheduler/deployment/src/main/java/io/quarkus/scheduler/deployment/SchedulerProcessor.java +++ b/extensions/scheduler/deployment/src/main/java/io/quarkus/scheduler/deployment/SchedulerProcessor.java @@ -241,7 +241,8 @@ private String generateInvoker(ScheduledBusinessMethodItem scheduledMethod, Clas sigBuilder.append(i.name().toString()); } String targetPackage = DotNames.packageName(bean.getImplClazz().name()); - String generatedName = targetPackage.replace('.', '/') + "/" + baseName + INVOKER_SUFFIX + "_" + method.name() + "_" + String generatedName = (targetPackage.isEmpty() ? "" : targetPackage.replace('.', '/') + "/") + baseName + + INVOKER_SUFFIX + "_" + method.name() + "_" + HashUtil.sha1(sigBuilder.toString()); ClassCreator invokerCreator = ClassCreator.builder().classOutput(classOutput).className(generatedName) diff --git a/extensions/vertx-web/deployment/src/main/java/io/quarkus/vertx/web/deployment/VertxWebProcessor.java b/extensions/vertx-web/deployment/src/main/java/io/quarkus/vertx/web/deployment/VertxWebProcessor.java index 4e7bae6d14a91..fbfa419d8417a 100644 --- a/extensions/vertx-web/deployment/src/main/java/io/quarkus/vertx/web/deployment/VertxWebProcessor.java +++ b/extensions/vertx-web/deployment/src/main/java/io/quarkus/vertx/web/deployment/VertxWebProcessor.java @@ -516,7 +516,8 @@ private String generateHandler(HandlerDescriptor desc, BeanInfo bean, MethodInfo for (Type i : method.parameters()) { sigBuilder.append(i.name().toString()); } - String generatedName = targetPackage.replace('.', '/') + "/" + baseName + HANDLER_SUFFIX + "_" + method.name() + "_" + String generatedName = (targetPackage.isEmpty() ? "" : targetPackage.replace('.', '/') + "/") + baseName + + HANDLER_SUFFIX + "_" + method.name() + "_" + HashUtil.sha1(sigBuilder.toString() + hashSuffix); ClassCreator invokerCreator = ClassCreator.builder().classOutput(classOutput).className(generatedName) diff --git a/extensions/vertx/deployment/src/main/java/io/quarkus/vertx/deployment/EventBusConsumer.java b/extensions/vertx/deployment/src/main/java/io/quarkus/vertx/deployment/EventBusConsumer.java index 75059fde21d1e..9538898ecc3b5 100644 --- a/extensions/vertx/deployment/src/main/java/io/quarkus/vertx/deployment/EventBusConsumer.java +++ b/extensions/vertx/deployment/src/main/java/io/quarkus/vertx/deployment/EventBusConsumer.java @@ -115,7 +115,8 @@ static String generateInvoker(BeanInfo bean, MethodInfo method, for (Type i : method.parameters()) { sigBuilder.append(i.name().toString()); } - String generatedName = targetPackage.replace('.', '/') + "/" + baseName + INVOKER_SUFFIX + "_" + method.name() + "_" + String generatedName = (targetPackage.isEmpty() ? "" : targetPackage.replace('.', '/') + "/") + baseName + + INVOKER_SUFFIX + "_" + method.name() + "_" + HashUtil.sha1(sigBuilder.toString()); ClassCreator invokerCreator = ClassCreator.builder().classOutput(classOutput).className(generatedName) diff --git a/independent-projects/arc/processor/src/main/java/io/quarkus/arc/processor/AbstractGenerator.java b/independent-projects/arc/processor/src/main/java/io/quarkus/arc/processor/AbstractGenerator.java index d4c828174829f..67124ffa043a3 100644 --- a/independent-projects/arc/processor/src/main/java/io/quarkus/arc/processor/AbstractGenerator.java +++ b/independent-projects/arc/processor/src/main/java/io/quarkus/arc/processor/AbstractGenerator.java @@ -42,7 +42,7 @@ static String generatedNameFromTarget(String targetPackage, String baseName, Str if (targetPackage == null || targetPackage.isEmpty()) { return baseName + suffix; } else { - return targetPackage.replace('.', '/') + "/" + baseName + suffix; + return (targetPackage.isEmpty() ? "" : targetPackage.replace('.', '/') + "/") + baseName + suffix; } } diff --git a/independent-projects/qute/generator/src/main/java/io/quarkus/qute/generator/ValueResolverGenerator.java b/independent-projects/qute/generator/src/main/java/io/quarkus/qute/generator/ValueResolverGenerator.java index d9e5881a23c6f..9b2648450e1ed 100644 --- a/independent-projects/qute/generator/src/main/java/io/quarkus/qute/generator/ValueResolverGenerator.java +++ b/independent-projects/qute/generator/src/main/java/io/quarkus/qute/generator/ValueResolverGenerator.java @@ -884,7 +884,7 @@ static String generatedNameFromTarget(String targetPackage, String baseName, Str } else if (targetPackage.startsWith("java")) { return "io/quarkus/qute" + "/" + baseName + suffix; } else { - return targetPackage.replace('.', '/') + "/" + baseName + suffix; + return (targetPackage.isEmpty() ? "" : targetPackage.replace('.', '/') + "/") + baseName + suffix; } }