snowdrop-zen / quarkus

Quarkus: Supersonic Subatomic Java.
https://quarkus.io
Apache License 2.0
1 stars 0 forks source link

Quarkus 2.1.0.CR1: Hibernate Validator produces a warning when combined with Resteasy Reactive and Kotlin Coroutines #379

Closed snowdrop-bot closed 3 years ago

snowdrop-bot commented 3 years ago

Describe the bug

The combination of Resteasy Reactive + Kotlin Coroutines + Hibernate Validator leads to the following warning at compile time:

[WARNING] [io.quarkus.hibernate.validator.deployment] Hibernate Validator does not support constraints on static methods yet. Constraints on org.acme.ReactiveGreetingResource#java.lang.Object hello$suspendImpl(org.acme.ReactiveGreetingResource name, java.lang.String $completion, kotlin.coroutines.Continuation) are ignored.

Expected behavior

No warning.

Actual behavior

No response

How to Reproduce?

  1. Create a new quarkus project with the dependencies: Resteasy Reactive + Kotlin Coroutines + Hibernate Validator
  2. Update Quarkus to 2.1.0.CR1
  3. Update Kotlin to 1.5.10
  4. Create a suspend function
import org.hibernate.validator.constraints.Length
import org.jboss.resteasy.reactive.RestPath
import javax.validation.constraints.NotNull
import javax.ws.rs.GET
import javax.ws.rs.Path
import javax.ws.rs.Produces
import javax.ws.rs.core.MediaType

@Path("/")
class ReactiveGreetingResource {

    @Path("{name}")
    @GET
    @Produces(MediaType.TEXT_PLAIN)
    suspend fun hello(
        @RestPath("name") @NotNull @Length(max = 5) name: String,
    ) = "Hello RESTEasy Reactive"
}

Output of uname -a or ver

No response

Output of java -version

No response

GraalVM version (if different from Java)

No response

Quarkus version or git rev

2.1.0.CR1

Build tool (ie. output of mvnw --version or gradlew --version)

No response

Additional information

No response


https://github.com/quarkusio/quarkus/issues/18783


$upstream:18783$