This is an automated email from the ASF dual-hosted git repository.
mikexue pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/eventmesh.git
The following commit(s) were added to refs/heads/master by this push:
new dff6e7aac [ISSUE #4263] InterruptedExceptions should never be
ignored[ThreadUtils] (#4297)
dff6e7aac is described below
commit dff6e7aac15774b49cc74f6ea8a60c63ac1e676a
Author: Harshitha Sudhakar
<[email protected]>
AuthorDate: Wed Aug 2 13:02:24 2023 +0530
[ISSUE #4263] InterruptedExceptions should never be ignored[ThreadUtils]
(#4297)
* Update ThreadUtils.java
* Update ThreadUtils.java
---
.../src/main/java/org/apache/eventmesh/common/utils/ThreadUtils.java | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git
a/eventmesh-common/src/main/java/org/apache/eventmesh/common/utils/ThreadUtils.java
b/eventmesh-common/src/main/java/org/apache/eventmesh/common/utils/ThreadUtils.java
index 03f070ceb..002530a54 100644
---
a/eventmesh-common/src/main/java/org/apache/eventmesh/common/utils/ThreadUtils.java
+++
b/eventmesh-common/src/main/java/org/apache/eventmesh/common/utils/ThreadUtils.java
@@ -34,7 +34,7 @@ public class ThreadUtils {
long timeout = ThreadLocalRandom.current().nextLong(min, max + 1);
timeUnit.sleep(timeout);
} catch (InterruptedException ignore) {
- //ignore
+ Thread.currentThread().interrupt();
}
}
@@ -51,7 +51,7 @@ public class ThreadUtils {
try {
sleepWithThrowException(timeout, timeUnit);
} catch (InterruptedException ignore) {
- //ignore
+ Thread.currentThread().interrupt();
}
}
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]