summaryrefslogtreecommitdiff
path: root/java/client
diff options
context:
space:
mode:
Diffstat (limited to 'java/client')
-rw-r--r--java/client/src/main/java/org/apache/qpid/client/BasicMessageProducer.java4
1 files changed, 2 insertions, 2 deletions
diff --git a/java/client/src/main/java/org/apache/qpid/client/BasicMessageProducer.java b/java/client/src/main/java/org/apache/qpid/client/BasicMessageProducer.java
index 0ee4882ec2..3691e80234 100644
--- a/java/client/src/main/java/org/apache/qpid/client/BasicMessageProducer.java
+++ b/java/client/src/main/java/org/apache/qpid/client/BasicMessageProducer.java
@@ -138,7 +138,7 @@ public class BasicMessageProducer extends Closeable implements org.apache.qpid.j
_channelId = channelId;
_session = session;
_producerId = producerId;
- if (destination != null)
+ if (destination != null && !(destination instanceof AMQUndefinedDestination))
{
declareDestination(destination);
}
@@ -150,7 +150,7 @@ public class BasicMessageProducer extends Closeable implements org.apache.qpid.j
void resubscribe() throws AMQException
{
- if (_destination != null)
+ if (_destination != null && !(_destination instanceof AMQUndefinedDestination))
{
declareDestination(_destination);
}