CXF
  1. CXF
  2. CXF-3847

ResponseBuilderImpl.status - validation against instance var instead of parameter

    Details

    • Estimated Complexity:
      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'.

        Activity

        Adam Johnson created issue -
        Sergey Beryozkin made changes -
        Field Original Value New Value
        Status Open [ 1 ] Resolved [ 5 ]
        Assignee Sergey Beryozkin [ sergey_beryozkin ]
        Fix Version/s 2.3.8 [ 12318348 ]
        Fix Version/s 2.4.4 [ 12318347 ]
        Fix Version/s 2.5 [ 12316525 ]
        Resolution Fixed [ 1 ]
        Daniel Kulp made changes -
        Status Resolved [ 5 ] Closed [ 6 ]
        Transition Time In Source Status Execution Times Last Executer Last Execution Date
        Open Open Resolved Resolved
        3h 15m 1 Sergey Beryozkin 06/Oct/11 22:05
        Resolved Resolved Closed Closed
        25d 5h 6m 1 Daniel Kulp 01/Nov/11 02:11

          People

          • Assignee:
            Sergey Beryozkin
            Reporter:
            Adam Johnson
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development