Uploaded image for project: 'RESTEasy'
  1. RESTEasy
  2. RESTEASY-3339

Jakarta JAX-RS Resource method parameter with @Valid is executing validation 2 times

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • Major
    • None
    • None
    • jaxrs

    Description

      Deploying a Web application in WildFly 28.0.0, let's assume the following JAX-RS resource class:
       
      @Path("debug")

      public class DebugResource {

      @POST

      public void create(@Valid User user) {

      ...

      }

      {color:#000000}}

       
      When a POST request is executed, the User parameter is validated twice.
      It seems that Jakarta CDI container, which uses proxies, may be the source
      of this unexpected behavior as, at least, two instances will be created:
      * DebugResource$Proxy$_$$_WeldClientProxy

      • DebugResource$Proxy$_$$_WeldSubclass
         
        Could this be a bug?

      Attachments

        Activity

          People

            dkafe Dimitris Kafetzis
            zhaiku Haiku Z (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated: