summaryrefslogtreecommitdiff
path: root/qpid/java/client
diff options
context:
space:
mode:
authorRajith Muditha Attapattu <rajith@apache.org>2010-01-28 15:21:26 +0000
committerRajith Muditha Attapattu <rajith@apache.org>2010-01-28 15:21:26 +0000
commit1e62c0e40ec5bdf17daaed8847136dbbe537cf9d (patch)
tree54ab397b99178f2ee2e2444665b499a94310c472 /qpid/java/client
parent1e275cd7e3c1eb5e8e0fbe550b846bbfe2309d51 (diff)
downloadqpid-python-1e62c0e40ec5bdf17daaed8847136dbbe537cf9d.tar.gz
Added a null check for connection as some test cases use mock sessions by passing null as the connection parameter
git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@904126 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'qpid/java/client')
-rw-r--r--qpid/java/client/src/main/java/org/apache/qpid/client/AMQSession.java2
1 files changed, 1 insertions, 1 deletions
diff --git a/qpid/java/client/src/main/java/org/apache/qpid/client/AMQSession.java b/qpid/java/client/src/main/java/org/apache/qpid/client/AMQSession.java
index 5946d9096e..a9142ff4e4 100644
--- a/qpid/java/client/src/main/java/org/apache/qpid/client/AMQSession.java
+++ b/qpid/java/client/src/main/java/org/apache/qpid/client/AMQSession.java
@@ -425,7 +425,7 @@ public abstract class AMQSession<C extends BasicMessageConsumer, P extends Basic
protected AMQSession(AMQConnection con, int channelId, boolean transacted, int acknowledgeMode,
MessageFactoryRegistry messageFactoryRegistry, int defaultPrefetchHighMark, int defaultPrefetchLowMark)
{
- USE_AMQP_ENCODED_MAP_MESSAGE = !con.isUseLegacyMapMessageFormat();
+ USE_AMQP_ENCODED_MAP_MESSAGE = con == null ? true : !con.isUseLegacyMapMessageFormat();
_strictAMQP = Boolean.parseBoolean(System.getProperties().getProperty(STRICT_AMQP, STRICT_AMQP_DEFAULT));
_strictAMQPFATAL =
Boolean.parseBoolean(System.getProperties().getProperty(STRICT_AMQP_FATAL, STRICT_AMQP_FATAL_DEFAULT));