From f6b4e1e453647a5a543c13070e098fad0ee52ce2 Mon Sep 17 00:00:00 2001 From: Daniel Silva Date: Thu, 17 Aug 2023 08:23:41 -0600 Subject: [PATCH] #25696 proper use of optional (#25801) --- .../com/dotcms/experiments/business/ExperimentsAPIImpl.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dotCMS/src/main/java/com/dotcms/experiments/business/ExperimentsAPIImpl.java b/dotCMS/src/main/java/com/dotcms/experiments/business/ExperimentsAPIImpl.java index 13e1b4bb3e3a..a73a0c088e0c 100644 --- a/dotCMS/src/main/java/com/dotcms/experiments/business/ExperimentsAPIImpl.java +++ b/dotCMS/src/main/java/com/dotcms/experiments/business/ExperimentsAPIImpl.java @@ -605,7 +605,7 @@ public Experiment forceStart(String experimentId, User user) cancelScheduledExperimentsUponConflicts(experimentToSave, user); toReturn = innerStart(experimentToSave, user, false); } else { - Scheduling scheduling = persistedExperiment.scheduling().get(); + Scheduling scheduling = persistedExperiment.scheduling().orElseThrow(); final Experiment experimentToSave = persistedExperiment.withScheduling(scheduling).withStatus(SCHEDULED); if(runningExperimentOnPage.isPresent()) {