Hibernate Validator is enabled by default when not used#45681
Hibernate Validator is enabled by default when not used#45681vmuzikar merged 2 commits intokeycloak:mainfrom
Conversation
Closes keycloak#45677 Signed-off-by: Martin Bartoš <mabartos@redhat.com>
| error.setErrorDescription("Cannot parse the JSON"); | ||
| } else if (isServerError) { | ||
| error.setErrorDescription("For more on this error consult the server log."); | ||
| } else if (throwable instanceof ValidationException) { |
There was a problem hiding this comment.
Not needed as we have the ValidationExceptionHandler.
Signed-off-by: Martin Bartoš <mabartos@redhat.com>
|
@vmuzikar Thanks! I've just added one small change to fix Quarkus UT tests (embedded). |
quarkus/deployment/src/main/java/org/keycloak/quarkus/deployment/KeycloakProcessor.java
Show resolved
Hide resolved
|
|
||
| @BuildStep(onlyIfNot = IsTest.class) // needed for embedded Keycloak | ||
| void disableHibernateValidatorCustomizer(BuildProducer<BuildTimeConditionBuildItem> removeBeans, CombinedIndexBuildItem index) { | ||
| if (!Profile.isFeatureEnabled(Profile.Feature.CLIENT_ADMIN_API_V2)) { |
There was a problem hiding this comment.
Not specific to this pr, but just wanted to highlight that moving forward this type of check is going to get messy. There will be a set of features and versions where hibernate validation might be used.
There was a problem hiding this comment.
@shawkins Once we adapt the Hibernate Validator keycloak-codebase-wide, we remove all these checks and the Hibernate Validator will be enabled by default. Right now, as it's not needed (only for experimental feature), we should not have it enabled by default as it's causing perf regressions for 26.5.x.
* Hibernate Validator is enabled by default when not used Closes keycloak#45677 Signed-off-by: Martin Bartoš <mabartos@redhat.com> * Disable Hibernate Validator factory customizer only for non testing Signed-off-by: Martin Bartoš <mabartos@redhat.com> --------- Signed-off-by: Martin Bartoš <mabartos@redhat.com> (cherry picked from commit 44375e2)
* Hibernate Validator is enabled by default when not used Closes keycloak#45677 Signed-off-by: Martin Bartoš <mabartos@redhat.com> * Disable Hibernate Validator factory customizer only for non testing Signed-off-by: Martin Bartoš <mabartos@redhat.com> --------- Signed-off-by: Martin Bartoš <mabartos@redhat.com>
Uh oh!
There was an error while loading. Please reload this page.