From 9b22e6c88920b4d06ff0a8a67153452f8fd1bd1b Mon Sep 17 00:00:00 2001
From: Valery Kharseko <vharseko@3a-systems.ru>
Date: Tue, 04 Aug 2026 08:29:20 +0000
Subject: [PATCH] Fix CodeQL note-severity alerts: deprecated JDK calls and inefficient expressions (#823)

---
 opendj-server-legacy/src/main/java/org/opends/guitools/controlpanel/ui/ImportLDIFPanel.java |    7 ++++---
 1 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/opendj-server-legacy/src/main/java/org/opends/guitools/controlpanel/ui/ImportLDIFPanel.java b/opendj-server-legacy/src/main/java/org/opends/guitools/controlpanel/ui/ImportLDIFPanel.java
index ef705c1..56e378d 100644
--- a/opendj-server-legacy/src/main/java/org/opends/guitools/controlpanel/ui/ImportLDIFPanel.java
+++ b/opendj-server-legacy/src/main/java/org/opends/guitools/controlpanel/ui/ImportLDIFPanel.java
@@ -13,6 +13,7 @@
  *
  * Copyright 2008-2010 Sun Microsystems, Inc.
  * Portions Copyright 2014-2016 ForgeRock AS.
+ * Portions Copyright 2026 3A Systems, LLC.
  */
 package org.opends.guitools.controlpanel.ui;
 
@@ -455,7 +456,7 @@
     }
 
     String ldifPath = file.getText();
-    if (ldifPath == null || "".equals(ldifPath.trim()))
+    if (ldifPath == null || ldifPath.trim().isEmpty())
     {
       errors.add(INFO_NO_LDIF_PATH.get());
       setPrimaryInvalid(lFile);
@@ -487,7 +488,7 @@
     if (writeRejects.isSelected())
     {
       String rejectPath = rejectsFile.getText();
-      if (rejectPath == null || "".equals(rejectPath.trim()))
+      if (rejectPath == null || rejectPath.trim().isEmpty())
       {
         errors.add(ERR_CTRL_PANEL_REJECTS_FILE_REQUIRED.get());
         setPrimaryInvalid(lRejectsFile);
@@ -503,7 +504,7 @@
     if (writeSkips.isSelected())
     {
       String skipPath = skipsFile.getText();
-      if (skipPath == null || "".equals(skipPath.trim()))
+      if (skipPath == null || skipPath.trim().isEmpty())
       {
         errors.add(ERR_CTRL_PANEL_SKIPS_FILE_REQUIRED.get());
         setPrimaryInvalid(lSkipsFile);

--
Gitblit v1.10.0