Skip to content

Commit

Permalink
Ensure ListenerBroadcast.getSource() never creates more than one `P…
Browse files Browse the repository at this point in the history
…roxyDispatchAdapter`
  • Loading branch information
abstratt committed Dec 19, 2024
1 parent 2ce999b commit a7a2ebb
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ public ListenerBroadcast(Class<T> type) {
*
* @return The broadcaster.
*/
public T getSource() {
public synchronized T getSource() {
if (source == null) {
source = new ProxyDispatchAdapter<T>(this, type);
}
Expand Down

0 comments on commit a7a2ebb

Please sign in to comment.