} else {
id = getStudyId(request);
study = studyService.findByID(id);
}
if (study == null) {
throw new EmptyStudyException(message_no_study);
}
}
/*
* XXX I (RAV) added the block below, I realize it's clunky,
* but I ended up in a condition where the map was null, but
* the study id was defined, so I did it like this. If there
* is a better way (which I'm sure there is) please fix this
* method.
*/
else {
id = Long.parseLong(request.getParameter("id").toString());
study = studyService.findByID(id);
if (study == null) {
throw new EmptyStudyException(message_no_study);
}
}
return study;
}