Skip to content

Commit 23fafa5

Browse files
committed
Add sanity check
1 parent f21324c commit 23fafa5

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

cloudplatform/connectivity-apache-httpclient4/src/main/java/com/sap/cloud/sdk/cloudplatform/connectivity/AbstractHttpClientCache.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -125,6 +125,10 @@ private static boolean isHealthy( final HttpClient httpClient )
125125
throws IllegalArgumentException,
126126
NullPointerException
127127
{
128+
if( !(httpClient instanceof HttpClientWrapper) ) {
129+
log.trace("Cannot verify health of HttpClient: {}", httpClient);
130+
return true;
131+
}
128132
try {
129133
val hc = (CloseableHttpClient) FieldUtils.readField(httpClient, "httpClient", true);
130134
val cm = (PoolingHttpClientConnectionManager) FieldUtils.readField(hc, "connManager", true);

0 commit comments

Comments
 (0)