From 4908cbe6dc59907837d705149125629929759083 Mon Sep 17 00:00:00 2001 From: John Lage Date: Fri, 22 May 2026 17:05:17 -0400 Subject: [PATCH] 67 move config validation to before lock file is acquired --- mmtc-core/src/main/java/edu/jhuapl/sd/sig/mmtc/app/MmtcCli.java | 1 + .../java/edu/jhuapl/sd/sig/mmtc/app/TimeCorrelationApp.java | 2 -- .../edu/jhuapl/sd/sig/mmtc/cfg/TimeCorrelationRunConfig.java | 2 +- 3 files changed, 2 insertions(+), 3 deletions(-) diff --git a/mmtc-core/src/main/java/edu/jhuapl/sd/sig/mmtc/app/MmtcCli.java b/mmtc-core/src/main/java/edu/jhuapl/sd/sig/mmtc/app/MmtcCli.java index 75e2e96..c3a7534 100644 --- a/mmtc-core/src/main/java/edu/jhuapl/sd/sig/mmtc/app/MmtcCli.java +++ b/mmtc-core/src/main/java/edu/jhuapl/sd/sig/mmtc/app/MmtcCli.java @@ -105,6 +105,7 @@ public static void main(String[] args) throws Exception { try { cfg = new MmtcConfig(); + cfg.validate(); } catch (Exception e) { logger.fatal("MMTC correlation initialization failed."); throw new MmtcException("MMTC correlation initialization failed.", e); diff --git a/mmtc-core/src/main/java/edu/jhuapl/sd/sig/mmtc/app/TimeCorrelationApp.java b/mmtc-core/src/main/java/edu/jhuapl/sd/sig/mmtc/app/TimeCorrelationApp.java index 3929a27..999a804 100644 --- a/mmtc-core/src/main/java/edu/jhuapl/sd/sig/mmtc/app/TimeCorrelationApp.java +++ b/mmtc-core/src/main/java/edu/jhuapl/sd/sig/mmtc/app/TimeCorrelationApp.java @@ -86,8 +86,6 @@ public TimeCorrelationApp(TimeCorrelationRunConfig config) throws MmtcException * the specified SPICE kernels. Load the SCLK kernel separately. */ private void init() throws Exception { - config.validate(); - new BuiltInOutputProductMigrationManager(config).assertExistingProductsDoNotRequireMigration(); logger.debug("Loading SPICE library"); diff --git a/mmtc-core/src/main/java/edu/jhuapl/sd/sig/mmtc/cfg/TimeCorrelationRunConfig.java b/mmtc-core/src/main/java/edu/jhuapl/sd/sig/mmtc/cfg/TimeCorrelationRunConfig.java index e6ef496..c76ebf1 100644 --- a/mmtc-core/src/main/java/edu/jhuapl/sd/sig/mmtc/cfg/TimeCorrelationRunConfig.java +++ b/mmtc-core/src/main/java/edu/jhuapl/sd/sig/mmtc/cfg/TimeCorrelationRunConfig.java @@ -401,7 +401,7 @@ public Map getFilters() throws MmtcException { } public boolean isCreateUplinkCmdFile() { - if (this.runConfigInputs.isCreateUplinkCmdFile) { + if (this.runConfigInputs != null && this.runConfigInputs.isCreateUplinkCmdFile) { return true; }