From e24c2780b6d44c7e5d386e70a1fb3346149ccdc9 Mon Sep 17 00:00:00 2001
From: Valery Kharseko <vharseko@3a-systems.ru>
Date: Tue, 04 Aug 2026 07:15:33 +0000
Subject: [PATCH] Fix CodeQL note-severity alerts: array logging and uncaught NumberFormatException (#817)
---
opendj-server-legacy/src/test/java/org/opends/server/replication/protocol/ByteArrayTest.java | 8 ++++++++
1 files changed, 8 insertions(+), 0 deletions(-)
diff --git a/opendj-server-legacy/src/test/java/org/opends/server/replication/protocol/ByteArrayTest.java b/opendj-server-legacy/src/test/java/org/opends/server/replication/protocol/ByteArrayTest.java
index a10c53f..05cb4f2 100644
--- a/opendj-server-legacy/src/test/java/org/opends/server/replication/protocol/ByteArrayTest.java
+++ b/opendj-server-legacy/src/test/java/org/opends/server/replication/protocol/ByteArrayTest.java
@@ -12,6 +12,7 @@
* information: "Portions Copyright [year] [name of copyright owner]".
*
* Copyright 2014-2016 ForgeRock AS.
+ * Portions Copyright 2026 3A Systems, LLC.
*/
package org.opends.server.replication.protocol;
@@ -209,6 +210,13 @@
}
@Test(expectedExceptions = DataFormatException.class)
+ public void testByteArrayScanner_nextCSNUTF8_throwsExceptionWhenNonHexCSN() throws Exception
+ {
+ final byte[] bytes = new ByteArrayBuilder().appendString("000000000001zabc002d0000007b").toByteArray();
+ new ByteArrayScanner(bytes).nextCSNUTF8();
+ }
+
+ @Test(expectedExceptions = DataFormatException.class)
public void testByteArrayScanner_nextDN_throwsExceptionWhenInvalidDN() throws Exception
{
final byte[] bytes = new ByteArrayBuilder().appendString("this is not a valid DN").toByteArray();
--
Gitblit v1.10.0