}
buffer.append(")");
// render the redelivery policy
if (onException.getRedeliveryPolicy() != null) {
RedeliveryPolicyDefinition redelivery = onException.getRedeliveryPolicy();
if (redelivery.getMaximumRedeliveries() != null) {
int maxRedeliveries = redelivery.getMaximumRedeliveries();
if (maxRedeliveries != 0) {
buffer.append(".maximumRedeliveries(").append(maxRedeliveries).append(")");
}
}
if (redelivery.getRedeliveryDelay() != null) {
long redeliverDelay = redelivery.getRedeliveryDelay();
if (redeliverDelay != 1000) {
buffer.append(".redeliverDelay(").append(redeliverDelay).append(")");
}
}
if (redelivery.getLogStackTrace() != null) {
if (redelivery.getLogStackTrace()) {
buffer.append(".logStackTrace(true)");
}
}
}