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

Null pointer exception in GeneralValidatorImpl

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • Major
    • 3.0.4.Final
    • 3.0.2.Final
    • None
    • None

    Description

      When a parameter annotated with @NotNull is passed a null value the class org.jboss.resteasy.plugins.validation.GeneralValidatorImpl will fail with a NullPointerException on line 72. This is due to the code calling toString() on the invalid null value.

      So in the line below "cv.getInvalidValue()" is called, returns a null and has "toString()" called on the null value.

      rcvs.add(new ResteasyConstraintViolation(ct, cv.getPropertyPath().toString(), cv.getMessage(), cv.getInvalidValue().toString()));

      Attachments

        Issue Links

          Activity

            People

              rsigal@redhat.com Ronald Sigal
              mksbikerider Michael Sutherland (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: