From e86129c8191d60cc90044394accf1067ef4e4204 Mon Sep 17 00:00:00 2001 From: Peter Palaga Date: Thu, 23 Mar 2023 10:58:31 +0100 Subject: [PATCH] quarkus-jaxb loads entity classes at build time even though no default JAXBContext will be created within the application #32059 --- .../java/io/quarkus/jaxb/deployment/JaxbProcessor.java | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/extensions/jaxb/deployment/src/main/java/io/quarkus/jaxb/deployment/JaxbProcessor.java b/extensions/jaxb/deployment/src/main/java/io/quarkus/jaxb/deployment/JaxbProcessor.java index 41ca49b52061f..29255342e9a08 100644 --- a/extensions/jaxb/deployment/src/main/java/io/quarkus/jaxb/deployment/JaxbProcessor.java +++ b/extensions/jaxb/deployment/src/main/java/io/quarkus/jaxb/deployment/JaxbProcessor.java @@ -314,14 +314,6 @@ FilteredJaxbClassesToBeBoundBuildItem filterBoundClasses( return builder.build(); } - @BuildStep - @Record(ExecutionTime.STATIC_INIT) - void setupJaxbContextConfig( - FilteredJaxbClassesToBeBoundBuildItem filteredClassesToBeBound, - JaxbContextConfigRecorder jaxbContextConfig) { - jaxbContextConfig.addClassesToBeBound(filteredClassesToBeBound.getClasses()); - } - @BuildStep @Record(ExecutionTime.STATIC_INIT) void validateDefaultJaxbContext( @@ -335,6 +327,7 @@ void validateDefaultJaxbContext( final Set beans = beanResolver .resolveBeans(Type.create(DotName.createSimple(JAXBContext.class), org.jboss.jandex.Type.Kind.CLASS)); if (!beans.isEmpty()) { + jaxbContextConfig.addClassesToBeBound(filteredClassesToBeBound.getClasses()); final BeanInfo bean = beanResolver.resolveAmbiguity(beans); if (bean.isDefaultBean()) { /*