From 504a43fc479d884085df9895900608dc5b0aca6f Mon Sep 17 00:00:00 2001
From: Valery Kharseko <vharseko@3a-systems.ru>
Date: Fri, 31 Jul 2026 07:52:35 +0000
Subject: [PATCH] Fix CodeQL warning-severity alerts: dead checks, boxed locals and three null dereferences (#793)

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

diff --git a/opendj-server-legacy/src/main/java/org/opends/guitools/controlpanel/ui/GenericDialog.java b/opendj-server-legacy/src/main/java/org/opends/guitools/controlpanel/ui/GenericDialog.java
index e81c995..f0dec5f 100644
--- a/opendj-server-legacy/src/main/java/org/opends/guitools/controlpanel/ui/GenericDialog.java
+++ b/opendj-server-legacy/src/main/java/org/opends/guitools/controlpanel/ui/GenericDialog.java
@@ -13,6 +13,7 @@
  *
  * Copyright 2008-2009 Sun Microsystems, Inc.
  * Portions Copyright 2014-2016 ForgeRock AS.
+ * Portions Copyright 2026 3A Systems, LLC.
  */
 package org.opends.guitools.controlpanel.ui;
 
@@ -200,10 +201,6 @@
     }
     if (visible && lastComponentWithFocus != null && lastComponentWithFocus.isVisible())
     {
-      if (lastComponentWithFocus == null)
-      {
-        lastComponentWithFocus = panel.getPreferredFocusComponent();
-      }
       lastComponentWithFocus.requestFocusInWindow();
     }
     updateDefaultButton(panel);

--
Gitblit v1.10.0