From 6d02372e71603b3fd3e861ec22c066de17ff1af2 Mon Sep 17 00:00:00 2001 From: Robert von Burg Date: Thu, 18 Jun 2020 14:18:59 +0200 Subject: [PATCH] [Minor] Code cleanup --- .../execution/policy/ReservationExecution.java | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/li.strolch.service/src/main/java/li/strolch/execution/policy/ReservationExecution.java b/li.strolch.service/src/main/java/li/strolch/execution/policy/ReservationExecution.java index 88d3e48d4..59aa469ce 100644 --- a/li.strolch.service/src/main/java/li/strolch/execution/policy/ReservationExecution.java +++ b/li.strolch.service/src/main/java/li/strolch/execution/policy/ReservationExecution.java @@ -62,14 +62,16 @@ public class ReservationExecution extends DurationExecution { @Override public void toExecuted(Action action) { switch (action.getType()) { + case TYPE_RESERVE: + setReservation(tx(), action, true); + break; case TYPE_RELEASE: - - setReservation(tx(), action, action.getType().equals(TYPE_RESERVE)); - - default: - super.toExecuted(action); + setReservation(tx(), action, false); + break; } + + super.toExecuted(action); } public static boolean isReserved(StrolchTransaction tx, Action action) {