}
if (executionYear == null) {
final ListIterator<ICurricularRule> iter = curricularRules.listIterator(curricularRules.size());
while (iter.hasPrevious()) {
final ICurricularRule curricularRule = iter.previous();
if (curricularRule.isActive()) {
return curricularRule;
}
}
return null;
}
ICurricularRule result = null;
for (final ICurricularRule curricularRule : curricularRules) {
if (curricularRule.isValid(executionYear)) {
if (result != null) {
// TODO: remove this throw when curricular rule ensures
// that it can be only one active for execution period