ElasticSearch Client: Wrapping of InterruptedException without restoring interrupted state of thread #68525
Labels
>bug
:Clients/Java Low Level REST Client
Minimal dependencies Java Client for Elasticsearch
Team:Data Management
Meta label for data/management team
Elasticsearch version: 7.6.2
Here, java.lang.InterruptedException is catched and wrapped without restoring the interrupt state (i.e. calling Thread.currentThread().interrupt()).
https://github.com/elastic/elasticsearch/blob/master/client/rest/src/main/java/org/elasticsearch/client/RestClient.java#L842
This is bad practice, since subsequent code might miss the fact that the thread is interrupted.
Similar issues have been submitted for other places before. See for example #4712
The text was updated successfully, but these errors were encountered: