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

Another Null pointer exception in GeneralValidatorImpl

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • Major
    • 3.0.6.Final
    • 3.0.4.Final, 3.0.5.Final
    • None
    • None

    Description

      Exactly the same issue as RESTEASY-913 but in another method (validateAllParameters). I can also see the same potential issue in validateReturnValue.

      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 106 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
              stallamy_jira Stephen Tallamy (Inactive)
              Votes:
              6 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: