https://hc.apache.org/httpcomponents-core-ga/httpcore/apidocs/org/apache/http/NoHttpResponseException.html

Signals that the target server failed to respond with a valid HTTP response.

Here a valid HTTP response received, I think it's better throw IllegalStateException . https://github.com/spring-projects/spring-framework/blob/a6f4862f13f96026bad09d4f40de933035043433/spring-web/src/main/java/org/springframework/remoting/httpinvoker/HttpComponentsHttpInvokerRequestExecutor.java#L326

Comment From: dPechman42

NoHttpResponseException is a subclass of IOException which is a checked exception.

Wouldn't it be better to continue using checked exceptions instead of switching to unchecked exceptions?

Additionally, NoHttpResponseException calls HttpException.clean() isn't this an important method to keep when changing the Exception type?

Comment From: rstoyanchev

@quaff this class is deprecated in 5.3 and we're not going to change it further. The validate method however is protected and can be overridden.