Uploaded image for project: 'CXF'
  1. CXF
  2. CXF-3847

ResponseBuilderImpl.status - validation against instance var instead of parameter

    XMLWordPrintableJSON

Details

    • Novice

    Description

      ResponseBuilderImpl.java

          public ResponseBuilder status(int s) {
              if (status < 100 || status > 599) {
                  throw new IllegalArgumentException("Illegal status value : " + s);
              }
              status = s;
              return this;
          }
      

      Noticed we were calling this with a value of 999 and not getting the IllegalArgumentException. If I add a second call immediately following I do get the exception.

      Verified the issue exists in our version (2.2.12) and current version.

      I expect the if statement should be checking the parameter 's' and not the instance variable 'status'.

      Attachments

        Activity

          People

            sergey_beryozkin Sergey Beryozkin
            jpsona Adam Johnson
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: