Uploaded image for project: 'WildFly'
  1. WildFly
  2. WFLY-13612

Bean Validation Problem In EJB inheritance

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Won't Do
    • Icon: Major Major
    • None
    • 20.0.0.Final
    • Bean Validation
    • None

       

      @Path("/test_action")
      public interface TestResource {
          @Path("test")
          @POST
          @Consumes(MediaType.APPLICATION_FORM_URLENCODED)
          @Produces(MediaType.APPLICATION_JSON)
          GeneralOperationResult test2(@FormParam("asdf") @NotBlank String asdf);
      }
      
      @Stateless
      public class TestResourceImpl implements TestResource {
          @Override
          public GeneralOperationResult test2(String asdf) {
              return GeneralOperationResult.createSuccess("test");
          }
      }
      

      The above code, the @NotBlank annotation works on wildfly19, but not on wildfly20.

      To make it work on wildfly20, I must add @NotBlank annotation to the override method.

      I wonder it's bug or it's your design?

      The above code, If I remove the @Stateless annotation, the @NotBlank annotation works as expectd.

              istudens@redhat.com Ivo Studensky
              wuhuaxu huaxu wu (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved: