Skip to content
Snippets Groups Projects
Commit d4a0f319 authored by aboeckle's avatar aboeckle
Browse files

OO-4402: Fixed redundant checks

parent a1884b81
No related branches found
No related tags found
No related merge requests found
......@@ -417,11 +417,14 @@ public class AccessConfigurationController extends FormBasicController {
// Two unlimited bookin methods
if (aFrom == null && aTo == null && bFrom == null && bTo == null) {
overlap = true;
break;
// One unlimited method and one with start or end or both
} else if (aFrom == null && aTo == null && (bFrom != null || bTo != null)) {
overlap = true;
break;
} else if (aFrom == null && aTo != null && bFrom != null && aTo.compareTo(bFrom) >= 0) {
overlap = true;
break;
}
}
......@@ -433,9 +436,14 @@ public class AccessConfigurationController extends FormBasicController {
bTo.compareTo(aTo) <= 0 &&
bTo.compareTo(aFrom) >= 0) {
overlap = true;
break;
}
}
}
if (overlap) {
break;
}
}
confControllerContainer.contextPut("overlappingConfigs", overlap);
confControllerContainer.setDirty(true);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment