From 7af51501d5a70e6cdff45d7c1c804f0e820d1d3a Mon Sep 17 00:00:00 2001
From: Valery Kharseko <vharseko@3a-systems.ru>
Date: Tue, 04 Aug 2026 11:53:39 +0000
Subject: [PATCH] Fix CodeQL note-severity alerts: Thread.run() calls and getters leaking internal state (#847)
---
opendj-server-legacy/src/main/java/org/opends/server/admin/client/cli/SecureConnectionCliArgs.java | 7 +++++--
1 files changed, 5 insertions(+), 2 deletions(-)
diff --git a/opendj-server-legacy/src/main/java/org/opends/server/admin/client/cli/SecureConnectionCliArgs.java b/opendj-server-legacy/src/main/java/org/opends/server/admin/client/cli/SecureConnectionCliArgs.java
index 4e34adb..abc2952 100644
--- a/opendj-server-legacy/src/main/java/org/opends/server/admin/client/cli/SecureConnectionCliArgs.java
+++ b/opendj-server-legacy/src/main/java/org/opends/server/admin/client/cli/SecureConnectionCliArgs.java
@@ -13,6 +13,7 @@
*
* Copyright 2007-2010 Sun Microsystems, Inc.
* Portions Copyright 2011-2016 ForgeRock AS.
+ * Portions Copyright 2026 3A Systems, LLC.
*/
package org.opends.server.admin.client.cli;
@@ -159,7 +160,9 @@
* @throws ArgumentException
* If there is a problem with any of the parameters used to create
* this argument.
- * @return a ArrayList with the options created.
+ * @return a new set holding the options created. Callers may add their own arguments to it:
+ * the set is a copy, so doing so does not add them to the connection arguments this
+ * object reports through {@link #argumentsPresent()}.
*/
public Set<Argument> createGlobalArguments() throws ArgumentException
{
@@ -230,7 +233,7 @@
connectTimeoutArg = connectTimeOutArgument();
argList.add(connectTimeoutArg);
- return argList;
+ return new LinkedHashSet<>(argList);
}
/**
--
Gitblit v1.10.0