Merge pull request #719 from jbonofre/AMQ-8395

[AMQ-8395] Avoid possible NPE when sending advisory message
This commit is contained in:
Jean-Baptiste Onofré 2021-10-25 06:44:32 +02:00 committed by GitHub
commit 9431585553
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -540,7 +540,7 @@ public class Topic extends BaseDestination implements Task {
message.incrementReferenceCount(); message.incrementReferenceCount();
if (context.isInTransaction()) { if (context.isInTransaction() && (context.getTransaction() != null)) {
context.getTransaction().addSynchronization(new Synchronization() { context.getTransaction().addSynchronization(new Synchronization() {
@Override @Override
public void afterCommit() throws Exception { public void afterCommit() throws Exception {