summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRajith Muditha Attapattu <rajith@apache.org>2011-03-09 21:14:05 +0000
committerRajith Muditha Attapattu <rajith@apache.org>2011-03-09 21:14:05 +0000
commitb1d8fa539615fdf8ec6d996bb4644003fdee1fa5 (patch)
tree1520f7b16a013ad6e6b0086a8496bb346cd80f7c
parentdad7a9e346d47a28dfe6f69fe95f9ee7129d0d22 (diff)
downloadqpid-python-b1d8fa539615fdf8ec6d996bb4644003fdee1fa5.tar.gz
Porting rev 1078961 from Qpid trunk to the 0.10 release branch.
git-svn-id: https://svn.apache.org/repos/asf/qpid/branches/0.10@1080001 13f79535-47bb-0310-9956-ffa450edef68
-rw-r--r--qpid/java/client/src/main/java/org/apache/qpid/client/BasicMessageConsumer_0_10.java3
-rw-r--r--qpid/java/client/src/main/java/org/apache/qpid/client/BasicMessageProducer_0_10.java3
2 files changed, 4 insertions, 2 deletions
diff --git a/qpid/java/client/src/main/java/org/apache/qpid/client/BasicMessageConsumer_0_10.java b/qpid/java/client/src/main/java/org/apache/qpid/client/BasicMessageConsumer_0_10.java
index 1c7c9a7bb5..964c238946 100644
--- a/qpid/java/client/src/main/java/org/apache/qpid/client/BasicMessageConsumer_0_10.java
+++ b/qpid/java/client/src/main/java/org/apache/qpid/client/BasicMessageConsumer_0_10.java
@@ -23,6 +23,7 @@ import org.apache.qpid.client.AMQDestination.AddressOption;
import org.apache.qpid.client.AMQDestination.DestSyntax;
import org.apache.qpid.client.failover.FailoverException;
import org.apache.qpid.client.message.*;
+import org.apache.qpid.client.messaging.address.Node.QueueNode;
import org.apache.qpid.client.protocol.AMQProtocolHandler;
import org.apache.qpid.framing.AMQShortString;
import org.apache.qpid.framing.FieldTable;
@@ -515,7 +516,7 @@ public class BasicMessageConsumer_0_10 extends BasicMessageConsumer<UnprocessedM
void cleanupQueue() throws AMQException, FailoverException
{
AMQDestination dest = this.getDestination();
- if (dest.getDestSyntax() == AMQDestination.DestSyntax.ADDR)
+ if (dest != null && dest.getDestSyntax() == AMQDestination.DestSyntax.ADDR)
{
if (dest.getDelete() == AddressOption.ALWAYS ||
dest.getDelete() == AddressOption.RECEIVER )
diff --git a/qpid/java/client/src/main/java/org/apache/qpid/client/BasicMessageProducer_0_10.java b/qpid/java/client/src/main/java/org/apache/qpid/client/BasicMessageProducer_0_10.java
index 0e3f4a5524..55ec56a425 100644
--- a/qpid/java/client/src/main/java/org/apache/qpid/client/BasicMessageProducer_0_10.java
+++ b/qpid/java/client/src/main/java/org/apache/qpid/client/BasicMessageProducer_0_10.java
@@ -34,6 +34,7 @@ import org.apache.qpid.client.AMQDestination.AddressOption;
import org.apache.qpid.client.AMQDestination.DestSyntax;
import org.apache.qpid.client.message.AMQMessageDelegate_0_10;
import org.apache.qpid.client.message.AbstractJMSMessage;
+import org.apache.qpid.client.messaging.address.Node.QueueNode;
import org.apache.qpid.client.protocol.AMQProtocolHandler;
import org.apache.qpid.transport.DeliveryProperties;
import org.apache.qpid.transport.Header;
@@ -246,7 +247,7 @@ public class BasicMessageProducer_0_10 extends BasicMessageProducer
{
super.close();
AMQDestination dest = _destination;
- if (dest.getDestSyntax() == AMQDestination.DestSyntax.ADDR)
+ if (dest != null && dest.getDestSyntax() == AMQDestination.DestSyntax.ADDR)
{
if (dest.getDelete() == AddressOption.ALWAYS ||
dest.getDelete() == AddressOption.SENDER )