Skip to content

Commit

Permalink
Compare numbers with equals() instead of == (opensearch-project#15366)
Browse files Browse the repository at this point in the history
Signed-off-by: Dmitry Kryukov <dk2k@ya.ru>
  • Loading branch information
dk2k authored Aug 25, 2024
1 parent 689cfca commit f195285
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -467,7 +467,7 @@ private void logLongRunningExecutions() {
final Thread thread = entry.getKey();
final String stackTrace = Arrays.stream(thread.getStackTrace()).map(Object::toString).collect(Collectors.joining("\n"));
final Thread.State threadState = thread.getState();
if (blockedSinceInNanos == registry.get(thread)) {
if (blockedSinceInNanos.equals(registry.get(thread))) {
logger.warn(
"Potentially blocked execution on network thread [{}] [{}] [{} milliseconds]: \n{}",
thread.getName(),
Expand Down

0 comments on commit f195285

Please sign in to comment.