From 51562f6a064b1dcf4f95e5cf6ff7e7abee3afd45 Mon Sep 17 00:00:00 2001 From: maillard Date: Thu, 24 Oct 2024 14:41:12 -0700 Subject: [PATCH] Fix uninitialized conflict return variable --- .../gov/nasa/jpl/aerie/scheduler/solver/PrioritySolver.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scheduler-driver/src/main/java/gov/nasa/jpl/aerie/scheduler/solver/PrioritySolver.java b/scheduler-driver/src/main/java/gov/nasa/jpl/aerie/scheduler/solver/PrioritySolver.java index 7167327a96..209a82f1e4 100644 --- a/scheduler-driver/src/main/java/gov/nasa/jpl/aerie/scheduler/solver/PrioritySolver.java +++ b/scheduler-driver/src/main/java/gov/nasa/jpl/aerie/scheduler/solver/PrioritySolver.java @@ -491,8 +491,8 @@ private void satisfyGoalGeneral(Goal goal) throws SchedulingInterruptedException assert missing != null; logger.info("Processing conflict " + (++i)); logger.info(missing.toString()); - //determine the best activities to satisfy the conflict - ConflictSolverResult conflictSolverReturn = null; + //initialize conflict result to unsatisfied + no activities created + var conflictSolverReturn = new ConflictSolverResult(); if (!analysisOnly && (missing instanceof MissingActivityInstanceConflict missingActivityInstanceConflict)) { conflictSolverReturn = solveActivityInstanceConflict(missingActivityInstanceConflict, goal); } else if (!analysisOnly && (missing instanceof MissingActivityTemplateConflict missingActivityTemplateConflict)) {