[Minor] Code cleanup

This commit is contained in:
Robert von Burg 2020-06-18 14:18:59 +02:00
parent b0787891f9
commit 6d02372e71
1 changed files with 7 additions and 5 deletions

View File

@ -62,14 +62,16 @@ public class ReservationExecution extends DurationExecution {
@Override @Override
public void toExecuted(Action action) { public void toExecuted(Action action) {
switch (action.getType()) { switch (action.getType()) {
case TYPE_RESERVE: case TYPE_RESERVE:
setReservation(tx(), action, true);
break;
case TYPE_RELEASE: case TYPE_RELEASE:
setReservation(tx(), action, false);
setReservation(tx(), action, action.getType().equals(TYPE_RESERVE)); break;
default:
super.toExecuted(action);
} }
super.toExecuted(action);
} }
public static boolean isReserved(StrolchTransaction tx, Action action) { public static boolean isReserved(StrolchTransaction tx, Action action) {