Repository: qpid-jms
Updated Branches:
  refs/heads/master a6b5f1bba -> e3d21a7e6


update incoming AmqpSequence without the x-opt-jms-msg-type message annotation 
to be an ObjectMessage


Project: http://git-wip-us.apache.org/repos/asf/qpid-jms/repo
Commit: http://git-wip-us.apache.org/repos/asf/qpid-jms/commit/5da7f7cd
Tree: http://git-wip-us.apache.org/repos/asf/qpid-jms/tree/5da7f7cd
Diff: http://git-wip-us.apache.org/repos/asf/qpid-jms/diff/5da7f7cd

Branch: refs/heads/master
Commit: 5da7f7cd2f04c9dcacb14d5ec6e845db71d7f308
Parents: a6b5f1b
Author: Robert Gemmell <[email protected]>
Authored: Fri Oct 3 15:47:02 2014 +0100
Committer: Robert Gemmell <[email protected]>
Committed: Fri Oct 3 15:47:02 2014 +0100

----------------------------------------------------------------------
 .../jms/provider/amqp/message/AmqpJmsMessageBuilder.java     | 2 +-
 .../jms/provider/amqp/message/AmqpTypedObjectDelegate.java   | 8 +++++---
 2 files changed, 6 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/qpid-jms/blob/5da7f7cd/qpid-jms-client/src/main/java/org/apache/qpid/jms/provider/amqp/message/AmqpJmsMessageBuilder.java
----------------------------------------------------------------------
diff --git 
a/qpid-jms-client/src/main/java/org/apache/qpid/jms/provider/amqp/message/AmqpJmsMessageBuilder.java
 
b/qpid-jms-client/src/main/java/org/apache/qpid/jms/provider/amqp/message/AmqpJmsMessageBuilder.java
index 0649e6c..b1aade4 100644
--- 
a/qpid-jms-client/src/main/java/org/apache/qpid/jms/provider/amqp/message/AmqpJmsMessageBuilder.java
+++ 
b/qpid-jms-client/src/main/java/org/apache/qpid/jms/provider/amqp/message/AmqpJmsMessageBuilder.java
@@ -145,7 +145,7 @@ public class AmqpJmsMessageBuilder {
                 return createObjectMessage(consumer, message);
             }
         } else if (body instanceof AmqpSequence) {
-            return createStreamMessage(consumer, message);
+            return createObjectMessage(consumer, message);
         }
 
         return null;

http://git-wip-us.apache.org/repos/asf/qpid-jms/blob/5da7f7cd/qpid-jms-client/src/main/java/org/apache/qpid/jms/provider/amqp/message/AmqpTypedObjectDelegate.java
----------------------------------------------------------------------
diff --git 
a/qpid-jms-client/src/main/java/org/apache/qpid/jms/provider/amqp/message/AmqpTypedObjectDelegate.java
 
b/qpid-jms-client/src/main/java/org/apache/qpid/jms/provider/amqp/message/AmqpTypedObjectDelegate.java
index 9fa88dd..e28dc39 100644
--- 
a/qpid-jms-client/src/main/java/org/apache/qpid/jms/provider/amqp/message/AmqpTypedObjectDelegate.java
+++ 
b/qpid-jms-client/src/main/java/org/apache/qpid/jms/provider/amqp/message/AmqpTypedObjectDelegate.java
@@ -56,15 +56,17 @@ public class AmqpTypedObjectDelegate implements 
AmqpObjectTypeDelegate {
             return null;
         } else if (body instanceof AmqpValue) {
             // TODO: This is assuming the object can be immediately returned, 
and is
-            //       Serializable. We will actually have to ensure elements are
+            //       deeply Serializable. We will actually have to ensure 
elements are
             //       Serializable and e.g convert the Uint/Ubyte etc wrappers.
             return (Serializable) ((AmqpValue) body).getValue();
         } else if (body instanceof Data) {
             // TODO: return as byte[]? ByteBuffer?
             throw new UnsupportedOperationException("Data support still to be 
added");
         } else if (body instanceof AmqpSequence) {
-            // TODO: return as list?
-            throw new UnsupportedOperationException("AmqpSequence support 
still to be added");
+            // TODO: This is assuming the object can be immediately returned, 
and is
+            //       deeply Serializable. We will actually have to ensure 
elements are
+            //       Serializable and e.g convert the Uint/Ubyte etc wrappers.
+            return (Serializable) ((AmqpSequence) body).getValue();
         } else {
             throw new IllegalStateException("Unexpected body type: " + 
body.getClass().getSimpleName());
         }


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to