Skip to content

Commit

Permalink
Register jakarta.validation.ConstraintViolation unconditionally
Browse files Browse the repository at this point in the history
The class is accessed even when not using hibernate validator.

Relates to quarkusio#41995
  • Loading branch information
zakkak committed Jan 16, 2025
1 parent 123acaa commit dcb73d9
Showing 1 changed file with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -241,12 +241,12 @@ AdditionalIndexedClassesBuildItem addPersistenceUnitAnnotationToIndex() {
@BuildStep
public void enrollBeanValidationTypeSafeActivatorForReflection(Capabilities capabilities,
BuildProducer<ReflectiveClassBuildItem> reflectiveClasses) {
if (capabilities.isPresent(Capability.HIBERNATE_VALIDATOR)) {
reflectiveClasses.produce(ReflectiveClassBuildItem.builder("org.hibernate.boot.beanvalidation.TypeSafeActivator")
.methods().fields().build());
reflectiveClasses.produce(ReflectiveClassBuildItem.builder(BeanValidationIntegrator.JAKARTA_BV_CHECK_CLASS)
.constructors(false).build());
}
// Accessed in org.hibernate.boot.beanvalidation.BeanValidationIntegrator.loadTypeSafeActivatorClass
reflectiveClasses.produce(ReflectiveClassBuildItem.builder("org.hibernate.boot.beanvalidation.TypeSafeActivator")
.methods().fields().build());
// Accessed in org.hibernate.boot.beanvalidation.BeanValidationIntegrator.isBeanValidationApiAvailable
reflectiveClasses.produce(ReflectiveClassBuildItem.builder(BeanValidationIntegrator.JAKARTA_BV_CHECK_CLASS)
.constructors(false).build());
}

@BuildStep
Expand Down

0 comments on commit dcb73d9

Please sign in to comment.