From 0138b5924ff14ef709398bf878dbb9bf2a0b7c33 Mon Sep 17 00:00:00 2001
From: Valery Kharseko <vharseko@3a-systems.ru>
Date: Wed, 23 Sep 2026 13:05:17 +0000
Subject: [PATCH] [#1030] Keep the setup log out of the way of start-ds, and say when it is gone (#1032)

---
 opendj-server-legacy/src/main/java/org/opends/quicksetup/SplashScreen.java |   14 ++++++++++----
 1 files changed, 10 insertions(+), 4 deletions(-)

diff --git a/opendj-server-legacy/src/main/java/org/opends/quicksetup/SplashScreen.java b/opendj-server-legacy/src/main/java/org/opends/quicksetup/SplashScreen.java
index e16a3bb..b2c0d01 100644
--- a/opendj-server-legacy/src/main/java/org/opends/quicksetup/SplashScreen.java
+++ b/opendj-server-legacy/src/main/java/org/opends/quicksetup/SplashScreen.java
@@ -26,6 +26,7 @@
 import java.awt.MediaTracker;
 import java.awt.Toolkit;
 import java.awt.Window;
+import java.util.function.Supplier;
 
 import javax.swing.SwingUtilities;
 
@@ -51,7 +52,12 @@
   private Object quickSetup;
 
   private Class<?> quickSetupClass;
-  private TempLogFile tempLogFile;
+  /**
+   * Supplies the temporary log file of the application behind this splash screen. Nothing
+   * here asks for it: the splash screen shows before anything is attempted, and a log created
+   * at that point outlives every road that attempts nothing (issue #1030).
+   */
+  private Supplier<TempLogFile> tempLogFile;
 
   /** Constant for the display of the splash screen. */
   private static final int MIN_SPLASH_DISPLAY = 3000;
@@ -61,11 +67,11 @@
    * It can be called from the event thread and outside the event thread.
    *
    * @param tempLogFile
-   *        temporary log file where messages will be logged
+   *        supplies the temporary log file where messages will be logged
    * @param args
    *        arguments to be passed to the method QuickSetup.initialize
    */
-  public static void main(final TempLogFile tempLogFile, String[] args)
+  public static void main(final Supplier<TempLogFile> tempLogFile, String[] args)
   {
     SplashScreen screen = new SplashScreen();
     screen.tempLogFile = tempLogFile;
@@ -196,7 +202,7 @@
     {
       quickSetupClass = Class.forName("org.opends.quicksetup.ui.QuickSetup");
       quickSetup = quickSetupClass.getDeclaredConstructor().newInstance();
-      quickSetupClass.getMethod("initialize", new Class[] { TempLogFile.class, String[].class })
+      quickSetupClass.getMethod("initialize", new Class[] { Supplier.class, String[].class })
                      .invoke(quickSetup, tempLogFile, args);
     } catch (Exception e)
     {

--
Gitblit v1.10.0