fix tests

This commit is contained in:
anhefti 2019-08-07 17:05:35 +02:00
parent ddc3a1ea17
commit c7da0a962a

View file

@ -292,13 +292,8 @@ public class OAuth2AuthorizationContextHolder implements AuthorizationContextHol
@Override
public boolean hasError(final ClientHttpResponse response) throws IOException {
final boolean hasError = super.hasError(response);
if (hasError) {
return hasError;
}
final HttpStatus statusCode = HttpStatus.resolve(response.getRawStatusCode());
return (statusCode != null && statusCode.series() == HttpStatus.Series.SERVER_ERROR);
return (statusCode != null && statusCode.series().equals(HttpStatus.Series.SERVER_ERROR));
}
}