Group group = groups.remove(candidate);
if (group == null) {
group = groups.remove("defaults");
}
if (group == null) {
throw new InvalidGroupNameException("'" + candidate
+ "'. Available groups are: " + groups.keySet());
}
doContribution(group, modelAndView, groups);
} catch (InvalidGroupNameException ex) {
modelAndView.addObject(varName(), "");