From 021823aa5ab39b204e0f8375cbd092d2e7fd5997 Mon Sep 17 00:00:00 2001 From: shawnhatch Date: Tue, 6 May 2025 16:08:31 -0400 Subject: [PATCH] Corrected simulation state nucleus error message --- .../gov/hhs/aspr/ms/gcm/simulation/nucleus/Experiment.java | 6 +++--- .../hhs/aspr/ms/gcm/simulation/nucleus/NucleusError.java | 2 +- .../gov/hhs/aspr/ms/gcm/simulation/nucleus/Simulation.java | 6 +++--- .../nucleus/testsupport/testplugin/TestSimulation.java | 6 +++--- 4 files changed, 10 insertions(+), 10 deletions(-) diff --git a/simulation/src/main/java/gov/hhs/aspr/ms/gcm/simulation/nucleus/Experiment.java b/simulation/src/main/java/gov/hhs/aspr/ms/gcm/simulation/nucleus/Experiment.java index 2139a8606..12efd335e 100644 --- a/simulation/src/main/java/gov/hhs/aspr/ms/gcm/simulation/nucleus/Experiment.java +++ b/simulation/src/main/java/gov/hhs/aspr/ms/gcm/simulation/nucleus/Experiment.java @@ -146,13 +146,13 @@ public Builder setExperimentParameterData(ExperimentParameterData experimentPara * Set the simulation state. Defaults to the current date and a start time of * zero. * - * @throws ContractException {@link NucleusError#NULL_SIMULATION_TIME} if the - * simulation time is null + * @throws ContractException {@link NucleusError#NULL_SIMULATION_STATE} if the + * simulation state is null */ public Builder setSimulationState(SimulationState simulationState) { ensureDataMutability(); if (simulationState == null) { - throw new ContractException(NucleusError.NULL_SIMULATION_TIME); + throw new ContractException(NucleusError.NULL_SIMULATION_STATE); } data.simulationState = simulationState; return this; diff --git a/simulation/src/main/java/gov/hhs/aspr/ms/gcm/simulation/nucleus/NucleusError.java b/simulation/src/main/java/gov/hhs/aspr/ms/gcm/simulation/nucleus/NucleusError.java index 4ecfe395b..03271185b 100644 --- a/simulation/src/main/java/gov/hhs/aspr/ms/gcm/simulation/nucleus/NucleusError.java +++ b/simulation/src/main/java/gov/hhs/aspr/ms/gcm/simulation/nucleus/NucleusError.java @@ -63,7 +63,7 @@ public enum NucleusError implements ContractError { NULL_SCENARIO_ID("Null scenario id"),// NULL_SCENARIO_PROGRESS_FILE("Null scenario progress file"),// NULL_SIMULATION_CONTEXT("Null simulation context"),// - NULL_SIMULATION_TIME("Null simulation time"),// + NULL_SIMULATION_STATE("Null simulation state data"),// OBSERVATION_EVENT_IMPROPER_RELEASE("An observation event is being released during a mutation by a data manager without the use of a corresponding mutation event"),// PAST_PLANNING_TIME("Plan execution time is in the past"),// PLANNING_QUEUE_ACTIVE("The planning queue is still active and plans cannot be retrieved"),// diff --git a/simulation/src/main/java/gov/hhs/aspr/ms/gcm/simulation/nucleus/Simulation.java b/simulation/src/main/java/gov/hhs/aspr/ms/gcm/simulation/nucleus/Simulation.java index 846abbc0b..b85d9fa10 100644 --- a/simulation/src/main/java/gov/hhs/aspr/ms/gcm/simulation/nucleus/Simulation.java +++ b/simulation/src/main/java/gov/hhs/aspr/ms/gcm/simulation/nucleus/Simulation.java @@ -90,12 +90,12 @@ public Builder setSimulationHaltTime(Double simulationHaltTime) { * Set the simulation state. Defaults to the current date and a start time of * zero. * - * @throws ContractException {@link NucleusError#NULL_SIMULATION_TIME} if the - * simulation time is null + * @throws ContractException {@link NucleusError#NULL_SIMULATION_STATE} if the + * simulation state is null */ public Builder setSimulationState(SimulationState simulationState) { if (simulationState == null) { - throw new ContractException(NucleusError.NULL_SIMULATION_TIME); + throw new ContractException(NucleusError.NULL_SIMULATION_STATE); } ensureDataMutability(); data.simulationState = simulationState; diff --git a/simulation/src/main/java/gov/hhs/aspr/ms/gcm/simulation/nucleus/testsupport/testplugin/TestSimulation.java b/simulation/src/main/java/gov/hhs/aspr/ms/gcm/simulation/nucleus/testsupport/testplugin/TestSimulation.java index adc254831..d8bda5f7f 100644 --- a/simulation/src/main/java/gov/hhs/aspr/ms/gcm/simulation/nucleus/testsupport/testplugin/TestSimulation.java +++ b/simulation/src/main/java/gov/hhs/aspr/ms/gcm/simulation/nucleus/testsupport/testplugin/TestSimulation.java @@ -74,13 +74,13 @@ public Builder setSimulationHaltTime(double simulationHaltTime) { * Set the simulation time. Defaults to the current date and a start time of * zero. * - * @throws ContractException {@link NucleusError#NULL_SIMULATION_TIME} if the - * simulation time is null + * @throws ContractException {@link NucleusError#NULL_SIMULATION_STATE} if the + * simulation state is null */ public Builder setSimulationState(SimulationState simulationState) { ensureDataMutability(); if (simulationState == null) { - throw new ContractException(NucleusError.NULL_SIMULATION_TIME); + throw new ContractException(NucleusError.NULL_SIMULATION_STATE); } data.simulationState = simulationState; return this;