From 74fe31b8864568224d9461e712d8e34e8eb8ba97 Mon Sep 17 00:00:00 2001
From: Valery Kharseko <vharseko@3a-systems.ru>
Date: Wed, 05 Aug 2026 08:33:01 +0000
Subject: [PATCH] Fix CodeQL note-severity alerts: shadowed locals, and the array cases of the debug formatter (#848)

---
 opendj-server-legacy/src/main/java/org/opends/server/replication/protocol/TopologyMsg.java |   12 ++++++------
 1 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/opendj-server-legacy/src/main/java/org/opends/server/replication/protocol/TopologyMsg.java b/opendj-server-legacy/src/main/java/org/opends/server/replication/protocol/TopologyMsg.java
index 8ed3986..c37a63d 100644
--- a/opendj-server-legacy/src/main/java/org/opends/server/replication/protocol/TopologyMsg.java
+++ b/opendj-server-legacy/src/main/java/org/opends/server/replication/protocol/TopologyMsg.java
@@ -70,25 +70,25 @@
 
     // Read the DS info entries, first read number of them
     int nDsInfo = scanner.nextByte();
-    final Map<Integer, DSInfo> replicaInfos = new HashMap<>(Math.max(0, nDsInfo));
+    final Map<Integer, DSInfo> newReplicaInfos = new HashMap<>(Math.max(0, nDsInfo));
     while (nDsInfo > 0 && !scanner.isEmpty())
     {
       final DSInfo dsInfo = nextDSInfo(scanner, version);
-      replicaInfos.put(dsInfo.getDsId(), dsInfo);
+      newReplicaInfos.put(dsInfo.getDsId(), dsInfo);
       nDsInfo--;
     }
 
     // Read the RS info entries
     int nRsInfo = scanner.nextByte();
-    final List<RSInfo> rsInfos = new ArrayList<>(Math.max(0, nRsInfo));
+    final List<RSInfo> newRsInfos = new ArrayList<>(Math.max(0, nRsInfo));
     while (nRsInfo > 0 && !scanner.isEmpty())
     {
-      rsInfos.add(nextRSInfo(scanner, version));
+      newRsInfos.add(nextRSInfo(scanner, version));
       nRsInfo--;
     }
 
-    this.replicaInfos = Collections.unmodifiableMap(replicaInfos);
-    this.rsInfos = Collections.unmodifiableList(rsInfos);
+    this.replicaInfos = Collections.unmodifiableMap(newReplicaInfos);
+    this.rsInfos = Collections.unmodifiableList(newRsInfos);
   }
 
   private DSInfo nextDSInfo(ByteArrayScanner scanner, short version)

--
Gitblit v1.10.0