From ac91c74cdad913b5cf0d41ce8466d247be6c201f Mon Sep 17 00:00:00 2001 From: Vijaya Gopal Yarramneni Date: Wed, 29 May 2019 16:04:24 -0700 Subject: [PATCH] Fixing a NullPointerException in RequestResponseLink (#359) --- azure-servicebus/azure-servicebus.pom | 2 +- .../azure/servicebus/primitives/RequestResponseLink.java | 4 ++-- pom.xml | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/azure-servicebus/azure-servicebus.pom b/azure-servicebus/azure-servicebus.pom index 54a943cb..d2f8db8b 100644 --- a/azure-servicebus/azure-servicebus.pom +++ b/azure-servicebus/azure-servicebus.pom @@ -4,7 +4,7 @@ 4.0.0 com.microsoft.azure azure-servicebus - 1.2.13 + 1.2.14 The MIT License (MIT) diff --git a/azure-servicebus/src/main/java/com/microsoft/azure/servicebus/primitives/RequestResponseLink.java b/azure-servicebus/src/main/java/com/microsoft/azure/servicebus/primitives/RequestResponseLink.java index 915b19c2..3e261b3c 100644 --- a/azure-servicebus/src/main/java/com/microsoft/azure/servicebus/primitives/RequestResponseLink.java +++ b/azure-servicebus/src/main/java/com/microsoft/azure/servicebus/primitives/RequestResponseLink.java @@ -433,8 +433,8 @@ public CompletableFuture requestAysnc(Message requestMessage, Duration this.amqpSender.sendRequest(requestId, false); // Check and recreate links if necessary - if(!((this.amqpSender.sendLink.getLocalState() == EndpointState.ACTIVE && this.amqpSender.sendLink.getRemoteState() == EndpointState.ACTIVE) - && (this.amqpReceiver.receiveLink.getLocalState() == EndpointState.ACTIVE && this.amqpReceiver.receiveLink.getRemoteState() == EndpointState.ACTIVE))) + if(!((this.amqpSender.sendLink != null && this.amqpSender.sendLink.getLocalState() == EndpointState.ACTIVE && this.amqpSender.sendLink.getRemoteState() == EndpointState.ACTIVE) + && (this.amqpReceiver.receiveLink != null && this.amqpReceiver.receiveLink.getLocalState() == EndpointState.ACTIVE && this.amqpReceiver.receiveLink.getRemoteState() == EndpointState.ACTIVE))) { this.ensureUniqueLinkRecreation(); } diff --git a/pom.xml b/pom.xml index 8482e06f..18d530ee 100644 --- a/pom.xml +++ b/pom.xml @@ -13,7 +13,7 @@ 0.31.0 4.12 1.7.0 - 1.2.13 + 1.2.14