Raise RestClientException for unknown status codes

HttpStatus cannot be created with an unknown status code. If a server
returns a status code that's not in the HttpStatus enum values, an
IllegalArgumentException is raised. Rather than allowing it to
propagate as such, this change ensures the actual exception raised is
a RestClientException.

Issue: SPR-9406
Backport-Issue: SPR-9502
This commit is contained in:
Rossen Stoyanchev
2012-06-12 14:54:16 -04:00
parent 1af7575bde
commit 24c30eac49
6 changed files with 179 additions and 76 deletions

View File

@@ -19,6 +19,7 @@ Changes in version 3.1.2 (2012-06-??)
* add Jackson 2 HttpMessageConverter and View types
* translate IOException from Jackson to HttpMessageNotReadableException
* fix content negotiation issue when sorting selected media types by quality value
* raise RestClientException instead of IllegalArgumentException for unknown status codes
Changes in version 3.1.1 (2012-02-16)