You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jira@kafka.apache.org by "abhi-ksolves (via GitHub)" <gi...@apache.org> on 2024/06/12 08:13:27 UTC
Re: [PR] KAFKA-16076: Fix Missing thread interrupt call in RestClient class [kafka]
abhi-ksolves commented on code in PR #16282:
URL: https://github.com/apache/kafka/pull/16282#discussion_r1636020686
##########
connect/runtime/src/main/java/org/apache/kafka/connect/runtime/rest/RestClient.java:
##########
@@ -189,9 +190,13 @@ private <T> HttpResponse<T> httpRequest(HttpClient client, String url, String me
Response.Status.INTERNAL_SERVER_ERROR.getStatusCode(),
"Unexpected status code when handling forwarded request: " + responseCode);
}
- } catch (IOException | InterruptedException | TimeoutException | ExecutionException e) {
+ } catch (IOException | TimeoutException | ExecutionException e) {
log.error("IO error forwarding REST request to {} :", url, e);
throw new ConnectRestException(Response.Status.INTERNAL_SERVER_ERROR, "IO Error trying to forward REST request: " + e.getMessage(), e);
+ } catch (InterruptedException e) {
+ log.error("Thread was interrupted forwarding REST request to {} :", url, e);
+ Thread.currentThread().interrupt();
Review Comment:
I believe it is not required because this httpRequest is an overloaded method that is only used by another httpRequest method invoked in RestClientTest.java.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: jira-unsubscribe@kafka.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org