From 1499d1c06ad0a3838c12074b73b2be30c980bb1f Mon Sep 17 00:00:00 2001 From: Guillaume Smet Date: Tue, 3 Jan 2023 11:44:10 +0100 Subject: [PATCH] Hibernate Validator - Normalize ClientProxy for bean metadata retrieval (cherry picked from commit b9969efaaf7c3369822456c80c52dc293ab1b6ea) --- .../runtime/ArcProxyBeanMetaDataClassNormalizer.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/extensions/hibernate-validator/runtime/src/main/java/io/quarkus/hibernate/validator/runtime/ArcProxyBeanMetaDataClassNormalizer.java b/extensions/hibernate-validator/runtime/src/main/java/io/quarkus/hibernate/validator/runtime/ArcProxyBeanMetaDataClassNormalizer.java index 674b387ad6d37..03d66360d2db5 100644 --- a/extensions/hibernate-validator/runtime/src/main/java/io/quarkus/hibernate/validator/runtime/ArcProxyBeanMetaDataClassNormalizer.java +++ b/extensions/hibernate-validator/runtime/src/main/java/io/quarkus/hibernate/validator/runtime/ArcProxyBeanMetaDataClassNormalizer.java @@ -2,12 +2,13 @@ import org.hibernate.validator.metadata.BeanMetaDataClassNormalizer; +import io.quarkus.arc.ClientProxy; import io.quarkus.arc.Subclass; /** * In the case of a proxy generated by Arc, return the parent class. *
- * This can have more than one level of hierarchy, in example: + * This can have more than one level of hierarchy, for example: * @@ -20,6 +21,9 @@ public Class normalize(Class beanClass) { while (Subclass.class.isAssignableFrom(targetClass)) { targetClass = targetClass.getSuperclass(); } + while (ClientProxy.class.isAssignableFrom(targetClass)) { + targetClass = targetClass.getSuperclass(); + } return targetClass; }