[
https://issues.apache.org/jira/browse/CXF-3847?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Sergey Beryozkin resolved CXF-3847.
-----------------------------------
Resolution: Fixed
Fix Version/s: 2.5
2.4.4
2.3.8
Assignee: Sergey Beryozkin
> ResponseBuilderImpl.status - validation against instance var instead of
> parameter
> ---------------------------------------------------------------------------------
>
> Key: CXF-3847
> URL: https://issues.apache.org/jira/browse/CXF-3847
> Project: CXF
> Issue Type: Bug
> Components: JAX-RS
> Affects Versions: 2.2.12, 2.4.2, 2.4.3
> Reporter: Adam Johnson
> Assignee: Sergey Beryozkin
> Priority: Minor
> Labels: ResponseBuilder, status
> Fix For: 2.3.8, 2.4.4, 2.5
>
>
> ResponseBuilderImpl.java
> {code}
> public ResponseBuilder status(int s) {
> if (status < 100 || status > 599) {
> throw new IllegalArgumentException("Illegal status value : " + s);
> }
> status = s;
> return this;
> }
> {code}
> 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'.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira