Skip to content

Commit

Permalink
Issue 1450: avoid NullPointerException which occurs during shutdown o… (
Browse files Browse the repository at this point in the history
#1451)

* Issue 1450: avoid NullPointerException which occurs during shutdown of the SpringBoot app

* Update spring-rabbit/src/main/java/org/springframework/amqp/rabbit/connection/AbstractConnectionFactory.java

Co-authored-by: Gary Russell <grussell@vmware.com>

Co-authored-by: Gary Russell <grussell@vmware.com>
  • Loading branch information
maecval and garyrussell authored Apr 14, 2022
1 parent 07a21d9 commit 0557be4
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,7 @@ protected ApplicationEventPublisher getApplicationEventPublisher() {

@Override
public void onApplicationEvent(ContextClosedEvent event) {
if (getApplicationContext().equals(event.getApplicationContext())) {
if (event.getApplicationContext().equals(getApplicationContext())) {
this.contextStopped = true;
}
if (this.publisherConnectionFactory != null) {
Expand Down

0 comments on commit 0557be4

Please sign in to comment.