Fix bean validation on suspending function parameters

This commit leverages Hibernate Validator's own internal use
of standard Java reflection to perform validation on suspending
function, which fixes the ArrayIndexOutOfBoundsException previously
observed.

Validation of suspending function return values remains unsupported
as Hibernate Validator is not Coroutines aware.

Closes gh-23499
This commit is contained in:
Sébastien Deleuze
2023-01-31 09:41:47 +01:00
parent 9c6fd3ed06
commit 89c7c6e9dd
3 changed files with 85 additions and 13 deletions

View File

@@ -36,6 +36,7 @@ dependencies {
testImplementation("org.apache.commons:commons-pool2")
testImplementation("org.awaitility:awaitility")
testImplementation("jakarta.inject:jakarta.inject-tck")
testImplementation("org.jetbrains.kotlinx:kotlinx-coroutines-core")
testRuntimeOnly("jakarta.xml.bind:jakarta.xml.bind-api")
testRuntimeOnly("org.glassfish:jakarta.el")
// Substitute for javax.management:jmxremote_optional:1.0.1_04 (not available on Maven Central)