This is an automated email from the ASF dual-hosted git repository.
lprimak pushed a commit to branch 3.x
in repository https://gitbox.apache.org/repos/asf/shiro.git
The following commit(s) were added to refs/heads/3.x by this push:
new cb38476d8 chore(tests): DefaultEventBus.registry is now
package-private so it's testable
cb38476d8 is described below
commit cb38476d870aa24c8669537515e4388c667756f6
Author: lprimak <[email protected]>
AuthorDate: Sun Jan 25 00:53:27 2026 -0600
chore(tests): DefaultEventBus.registry is now package-private so it's
testable
---
.../main/java/org/apache/shiro/event/support/DefaultEventBus.java | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git
a/event/src/main/java/org/apache/shiro/event/support/DefaultEventBus.java
b/event/src/main/java/org/apache/shiro/event/support/DefaultEventBus.java
index 4a7e6c66f..4a62590d7 100644
--- a/event/src/main/java/org/apache/shiro/event/support/DefaultEventBus.java
+++ b/event/src/main/java/org/apache/shiro/event/support/DefaultEventBus.java
@@ -81,8 +81,6 @@ public class DefaultEventBus implements EventBus {
//this is stateless, we can retain a static final reference:
private static final EventListenerComparator EVENT_LISTENER_COMPARATOR =
new EventListenerComparator();
- private EventListenerResolver eventListenerResolver;
-
//We want to preserve registration order to deliver events to objects in
the order that they are registered
//with the event bus. This has the nice effect that any Shiro
system-level components that are registered first
//(likely to happen upon startup) have precedence over those registered by
end-user components later.
@@ -97,9 +95,10 @@ public class DefaultEventBus implements EventBus {
//and the lock provides thread-safety in probably a much simpler mechanism
than attempting to write a
//EventBus-specific Comparator. This technique is also likely to be
faster than a ConcurrentSkipListMap, which
//is about 3-5 times slower than a standard ConcurrentMap.
- private final Map<Object, Subscription> registry;
+ final Map<Object, Subscription> registry;
private final Lock registryReadLock;
private final Lock registryWriteLock;
+ private EventListenerResolver eventListenerResolver;
public DefaultEventBus() {
//not thread safe, so we need locks: