qpid-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rob...@apache.org
Subject [6/8] git commit: add content type checking to initialise the correct delegate, enable test
Date Fri, 03 Oct 2014 12:45:25 GMT
add content type checking to initialise the correct delegate, enable test


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

Branch: refs/heads/master
Commit: 0001dd5f40a2cd23a3318623ad56dfa455ae3048
Parents: 19d2d05
Author: Robert Gemmell <robbie@apache.org>
Authored: Fri Oct 3 11:31:54 2014 +0100
Committer: Robert Gemmell <robbie@apache.org>
Committed: Fri Oct 3 11:31:54 2014 +0100

----------------------------------------------------------------------
 .../jms/provider/amqp/message/AmqpJmsObjectMessageFacade.java    | 4 ++--
 .../qpid/jms/integration/ObjectMessageIntegrationTest.java       | 1 -
 2 files changed, 2 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/qpid-jms/blob/0001dd5f/qpid-jms-client/src/main/java/org/apache/qpid/jms/provider/amqp/message/AmqpJmsObjectMessageFacade.java
----------------------------------------------------------------------
diff --git a/qpid-jms-client/src/main/java/org/apache/qpid/jms/provider/amqp/message/AmqpJmsObjectMessageFacade.java
b/qpid-jms-client/src/main/java/org/apache/qpid/jms/provider/amqp/message/AmqpJmsObjectMessageFacade.java
index 20053d6..2fc08fe 100644
--- a/qpid-jms-client/src/main/java/org/apache/qpid/jms/provider/amqp/message/AmqpJmsObjectMessageFacade.java
+++ b/qpid-jms-client/src/main/java/org/apache/qpid/jms/provider/amqp/message/AmqpJmsObjectMessageFacade.java
@@ -64,8 +64,8 @@ public class AmqpJmsObjectMessageFacade extends AmqpJmsMessageFacade implements
     public AmqpJmsObjectMessageFacade(AmqpConsumer consumer, Message message) {
         super(consumer, message);
 
-        // TODO detect the content type and init the proper delegate.
-        initDelegate(false);
+        boolean javaSerialized = AmqpMessageSupport.SERIALIZED_JAVA_OBJECT_CONTENT_TYPE.equals(message.getContentType());
+        initDelegate(!javaSerialized);
     }
 
     /**

http://git-wip-us.apache.org/repos/asf/qpid-jms/blob/0001dd5f/qpid-jms-client/src/test/java/org/apache/qpid/jms/integration/ObjectMessageIntegrationTest.java
----------------------------------------------------------------------
diff --git a/qpid-jms-client/src/test/java/org/apache/qpid/jms/integration/ObjectMessageIntegrationTest.java
b/qpid-jms-client/src/test/java/org/apache/qpid/jms/integration/ObjectMessageIntegrationTest.java
index e08678e..f965f63 100644
--- a/qpid-jms-client/src/test/java/org/apache/qpid/jms/integration/ObjectMessageIntegrationTest.java
+++ b/qpid-jms-client/src/test/java/org/apache/qpid/jms/integration/ObjectMessageIntegrationTest.java
@@ -256,7 +256,6 @@ public class ObjectMessageIntegrationTest extends QpidJmsTestCase
     }
 
     @Test(timeout = 5000)
-    @Ignore //TODO: currently failing due to being unable to receive the AmqpValue body section
type
     public void testRecieveBasicObjectMessageWithAmqpTypedContentAndJMSMessageTypeAnnotation()
throws Exception
     {
         try(TestAmqpPeer testPeer = new TestAmqpPeer(IntegrationTestFixture.PORT);)


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@qpid.apache.org
For additional commands, e-mail: commits-help@qpid.apache.org


Mime
View raw message