From 504a43fc479d884085df9895900608dc5b0aca6f Mon Sep 17 00:00:00 2001
From: Valery Kharseko <vharseko@3a-systems.ru>
Date: Fri, 31 Jul 2026 07:52:35 +0000
Subject: [PATCH] Fix CodeQL warning-severity alerts: dead checks, boxed locals and three null dereferences (#793)

---
 opendj-server-legacy/src/main/java/org/opends/server/replication/server/ServerHandler.java |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/opendj-server-legacy/src/main/java/org/opends/server/replication/server/ServerHandler.java b/opendj-server-legacy/src/main/java/org/opends/server/replication/server/ServerHandler.java
index ccb3ebd..8037b16 100644
--- a/opendj-server-legacy/src/main/java/org/opends/server/replication/server/ServerHandler.java
+++ b/opendj-server-legacy/src/main/java/org/opends/server/replication/server/ServerHandler.java
@@ -791,7 +791,7 @@
     final Random random = new Random();
     final int randomTime = random.nextInt(6); // Random from 0 to 5
     // Wait at least 3 seconds + (0 to 5 seconds)
-    final long timeout = 3000 + randomTime * 1000;
+    final long timeout = 3000 + randomTime * 1000L;
     final boolean lockAcquired = replicationServerDomain.tryLock(timeout);
     if (!lockAcquired)
     {

--
Gitblit v1.10.0