From 1bace287d2e2656c59965bc06dee83dfa0003450 Mon Sep 17 00:00:00 2001 From: "Piotr P. Karwasz" Date: Mon, 28 Oct 2024 12:30:53 +0100 Subject: [PATCH] Don't return when `@PluginFactory` is present This a workaround for apache/logging-log4j2#3126. --- .../log4j/converter/plugins/internal/PluginDescriptors.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/log4j-converter-plugin-descriptor/src/main/java/org/apache/logging/log4j/converter/plugins/internal/PluginDescriptors.java b/log4j-converter-plugin-descriptor/src/main/java/org/apache/logging/log4j/converter/plugins/internal/PluginDescriptors.java index bfeaca7..6600a1a 100644 --- a/log4j-converter-plugin-descriptor/src/main/java/org/apache/logging/log4j/converter/plugins/internal/PluginDescriptors.java +++ b/log4j-converter-plugin-descriptor/src/main/java/org/apache/logging/log4j/converter/plugins/internal/PluginDescriptors.java @@ -409,8 +409,8 @@ private List findBuilderClassHierarchy(final ClassLoader classLoader) { for (final Annotation annotation : method.getAnnotations()) { switch (annotation.annotationType().getName()) { case PLUGIN_FACTORY: - // No need to search further, there is no builder - return Collections.emptyList(); + // Continue the search until apache/logging-log4j2#3126 is fixed. + break; case PLUGIN_BUILDER_FACTORY: return computeClassHierarchy(findBuilderClass(method.getGenericReturnType())); }