Skip to content

Commit

Permalink
Merge pull request #32060 from ppalaga/i32059
Browse files Browse the repository at this point in the history
The quarkus-jaxb extension loads entity classes at build time even though no default JAXBContext will be created within the application
  • Loading branch information
Sgitario authored Mar 23, 2023
2 parents 6121033 + e86129c commit 8e40dad
Showing 1 changed file with 1 addition and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand All @@ -335,6 +327,7 @@ void validateDefaultJaxbContext(
final Set<BeanInfo> 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()) {
/*
Expand Down

0 comments on commit 8e40dad

Please sign in to comment.