Fix nonsensical deprecation for specifying listener priority (#1491)

* Fix nonsensical deprecation for specifying listener priority

* Fix checkstyle error
This commit is contained in:
Henri Schubin
2025-01-21 19:37:20 +02:00
committed by GitHub
parent 71feb11b2e
commit 7392cd6574
3 changed files with 12 additions and 6 deletions

View File

@@ -350,8 +350,9 @@ public class VelocityEventManager implements EventManager {
asyncType = AsyncType.ALWAYS;
}
// The default value of 0 will fall back to PostOrder, the default PostOrder (NORMAL) is also 0
final short order;
if (subscribe.order() == PostOrder.CUSTOM) {
if (subscribe.priority() != 0) {
order = subscribe.priority();
} else {
order = (short) POST_ORDER_MAP.get(subscribe.order());