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/authorization/dseecompat/PatternIP.java | 9 +++++----
1 files changed, 5 insertions(+), 4 deletions(-)
diff --git a/opendj-server-legacy/src/main/java/org/opends/server/authorization/dseecompat/PatternIP.java b/opendj-server-legacy/src/main/java/org/opends/server/authorization/dseecompat/PatternIP.java
index 7f90edb..2190ffb 100644
--- a/opendj-server-legacy/src/main/java/org/opends/server/authorization/dseecompat/PatternIP.java
+++ b/opendj-server-legacy/src/main/java/org/opends/server/authorization/dseecompat/PatternIP.java
@@ -13,6 +13,7 @@
*
* Copyright 2008 Sun Microsystems, Inc.
* Portions Copyright 2014-2016 ForgeRock AS.
+ * Portions Copyright 2026 3A Systems, LLC.
*/
package org.opends.server.authorization.dseecompat;
@@ -386,17 +387,17 @@
*/
public EnumEvalResult evaluate(InetAddress remoteAddr) {
EnumEvalResult matched=EnumEvalResult.FALSE;
- IPType ipType=IPType.IPv4;
+ IPType remoteIpType=IPType.IPv4;
byte[] addressBytes=remoteAddr.getAddress();
if(remoteAddr instanceof Inet6Address) {
- ipType=IPType.IPv6;
+ remoteIpType=IPType.IPv6;
Inet6Address addr6 = (Inet6Address) remoteAddr;
addressBytes= addr6.getAddress();
if(addr6.isIPv4CompatibleAddress()) {
- ipType=IPType.IPv4;
+ remoteIpType=IPType.IPv4;
}
}
- if(ipType != this.ipType) {
+ if(remoteIpType != ipType) {
return EnumEvalResult.FALSE;
}
if(matchAddress(addressBytes)) {
--
Gitblit v1.10.0