Don't create order twice.

This commit is contained in:
asofold 2017-04-24 20:12:16 +02:00
parent d2ed656409
commit f82d387a88

View File

@ -207,17 +207,17 @@ public class RegisteredItemStore {
// Better support this to avoid confusion (?).
order = ((IGetRegistrationOrder) item).getRegistrationOrder();
}
// Check Annotations.
//
if (order == null) {
// Check Annotations.
RegisterWithOrder annoOrder = item.getClass().getAnnotation(RegisterWithOrder.class);
if (annoOrder != null) {
order = new RegistrationOrder(annoOrder);
}
}
//
if (order == null) {
// Default order.
order = RegistrationOrder.DEFAULT_ORDER;
else {
// Default order.
order = RegistrationOrder.DEFAULT_ORDER;
}
}
else {
// Copy what has been found outside, huh.