summaryrefslogtreecommitdiff
path: root/qpid/java/client/src/main
diff options
context:
space:
mode:
Diffstat (limited to 'qpid/java/client/src/main')
-rw-r--r--qpid/java/client/src/main/java/org/apache/qpid/client/AMQConnection.java3
-rw-r--r--qpid/java/client/src/main/java/org/apache/qpid/client/message/AMQPEncodedListMessage.java14
2 files changed, 2 insertions, 15 deletions
diff --git a/qpid/java/client/src/main/java/org/apache/qpid/client/AMQConnection.java b/qpid/java/client/src/main/java/org/apache/qpid/client/AMQConnection.java
index 6758c2bf1e..6f2631ac05 100644
--- a/qpid/java/client/src/main/java/org/apache/qpid/client/AMQConnection.java
+++ b/qpid/java/client/src/main/java/org/apache/qpid/client/AMQConnection.java
@@ -306,7 +306,8 @@ public class AMQConnection extends Closeable implements Connection, QueueConnect
else
{
// use the default value set for all connections
- _useLegacyStreamMessageFormat = Boolean.getBoolean(ClientProperties.USE_LEGACY_STREAM_MESSAGE_FORMAT);
+ _useLegacyStreamMessageFormat = System.getProperty(ClientProperties.USE_LEGACY_STREAM_MESSAGE_FORMAT) == null ?
+ true : Boolean.getBoolean(ClientProperties.USE_LEGACY_STREAM_MESSAGE_FORMAT);
}
String amqpVersion = System.getProperty((ClientProperties.AMQP_VERSION), "0-10");
diff --git a/qpid/java/client/src/main/java/org/apache/qpid/client/message/AMQPEncodedListMessage.java b/qpid/java/client/src/main/java/org/apache/qpid/client/message/AMQPEncodedListMessage.java
index a6802c8dec..1d2cb43322 100644
--- a/qpid/java/client/src/main/java/org/apache/qpid/client/message/AMQPEncodedListMessage.java
+++ b/qpid/java/client/src/main/java/org/apache/qpid/client/message/AMQPEncodedListMessage.java
@@ -91,7 +91,6 @@ public class AMQPEncodedListMessage extends JMSStreamMessage implements
{
checkWritable();
checkAllowedValue(a);
- checkIfElementIsOfCorrectType(a);
try
{
return _list.add(a);
@@ -933,17 +932,4 @@ public class AMQPEncodedListMessage extends JMSStreamMessage implements
{
return _list;
}
-
- private void checkIfElementIsOfCorrectType(Object obj) throws JMSException
- {
- if (!_list.isEmpty())
- {
- if (obj.getClass() != _list.get(0).getClass())
- {
- throw new MessageFormatException("List can only contain elements of the same type."+
- " The first element of the list is of type " + _list.get(0).getClass() +
- " ,while the element suplied here is of type " + obj.getClass());
- }
- }
- }
}