Skip to content

Commit

Permalink
Fix null date check in OutstandingScenariosNagLogic
Browse files Browse the repository at this point in the history
Moved the null date check earlier in the loop to avoid potential null pointer exceptions when processing scenarios. This ensures scenarios with null dates are skipped before any operations on their dates are conducted.
  • Loading branch information
IllianiCBT committed Jan 13, 2025
1 parent bc20a6d commit d55f348
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -53,12 +53,12 @@ public static String getOutstandingScenarios(Campaign campaign) {
for (AtBScenario scenario : contract.getCurrentAtBScenarios()) {
LocalDate scenarioDate = scenario.getDate();

// Skip scenarios not matching today's date
if (!scenarioDate.equals(today)) {
if (scenario.getDate() == null) {
continue;
}

if (scenario.getDate() == null) {
// Skip scenarios not matching today's date
if (!scenarioDate.equals(today)) {
continue;
}

Expand Down

0 comments on commit d55f348

Please sign in to comment.