Skip to content

Fixing 22325 issue application listeners logic #23779

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 3 commits into from
Closed

Fixing 22325 issue application listeners logic #23779

wants to merge 3 commits into from

Conversation

platonovr
Copy link

@platonovr platonovr commented Oct 11, 2019

There was an issue #22325 and @jhoeller has fixed it, but now I have the following problem: on the application startup there is a call of prepareRefresh(), so it works like that
this.earlyApplicationListeners = new LinkedHashSet<>(this.applicationListeners);
this.applicationListeners is an empty collection.
Then it's needed to refresh the Application Context, app provokes the refresh() at AbstractApplicationContext, then Spring calls prepareRefresh and then checks
this.earlyApplicationListeners == null,
but it's an empty LinkedHashSet, not null, it's zero size set, so then it comes to
this.applicationListeners.clear();
and all the listeners are removed, but they were created, so I'm loosing all of applicationListeners there.
Application listeners collection was filled by CXF Servlet code

Don't loose the application listeners, if early set was empty.
@spring-projects-issues spring-projects-issues added the status: waiting-for-triage An issue we've not yet triaged or decided on label Oct 11, 2019
@platonovr platonovr closed this Oct 11, 2019
@platonovr platonovr reopened this Oct 11, 2019
@platonovr platonovr closed this Oct 11, 2019
@platonovr platonovr deleted the fix-22325 branch October 11, 2019 12:09
@bclozel bclozel removed the status: waiting-for-triage An issue we've not yet triaged or decided on label Feb 18, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants