return;
}
}
if (isOneHandler) {
// TODO : should we allow both phaseFirst and phaseLast to be true for one Handler??
throw new PhaseException(this.getPhaseName()
+ "can only have one handler, since there is a "
+ "handler with both phaseFirst and PhaseLast true ");
}
if (handler.getRules().isPhaseFirst() && handler.getRules().isPhaseLast()) {
if (handlers.size() > 0) {
throw new PhaseException(this.getPhaseName()
+ " can not have more than one handler "
+ handler.getName()
+ " is invalid or incorrect phase rules");
} else {
handlers.add(handler.getHandler());