summaryrefslogtreecommitdiff
path: root/qpid/java/amqp-1-0-common
diff options
context:
space:
mode:
authorRobert Godfrey <rgodfrey@apache.org>2015-02-21 13:59:32 +0000
committerRobert Godfrey <rgodfrey@apache.org>2015-02-21 13:59:32 +0000
commit27942ce9550fe965c566c58127c1db339459c956 (patch)
tree31446b293a544aaca873d8358aa896cd3914f537 /qpid/java/amqp-1-0-common
parent09e4929f78d29253d1f1baa5c8d1bb4714b9f6b9 (diff)
downloadqpid-python-27942ce9550fe965c566c58127c1db339459c956.tar.gz
QPID-6404 : Be lenient in receiving invalid messages, send AmqpValue(null) for the empty message
git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@1661364 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'qpid/java/amqp-1-0-common')
-rw-r--r--qpid/java/amqp-1-0-common/src/main/java/org/apache/qpid/amqp_1_0/type/messaging/codec/AmqpValueConstructor.java15
1 files changed, 3 insertions, 12 deletions
diff --git a/qpid/java/amqp-1-0-common/src/main/java/org/apache/qpid/amqp_1_0/type/messaging/codec/AmqpValueConstructor.java b/qpid/java/amqp-1-0-common/src/main/java/org/apache/qpid/amqp_1_0/type/messaging/codec/AmqpValueConstructor.java
index 2000880361..30de72604b 100644
--- a/qpid/java/amqp-1-0-common/src/main/java/org/apache/qpid/amqp_1_0/type/messaging/codec/AmqpValueConstructor.java
+++ b/qpid/java/amqp-1-0-common/src/main/java/org/apache/qpid/amqp_1_0/type/messaging/codec/AmqpValueConstructor.java
@@ -25,8 +25,8 @@ package org.apache.qpid.amqp_1_0.type.messaging.codec;
import org.apache.qpid.amqp_1_0.codec.DescribedTypeConstructor;
import org.apache.qpid.amqp_1_0.codec.DescribedTypeConstructorRegistry;
-import org.apache.qpid.amqp_1_0.type.*;
-import org.apache.qpid.amqp_1_0.type.messaging.*;
+import org.apache.qpid.amqp_1_0.type.Symbol;
+import org.apache.qpid.amqp_1_0.type.UnsignedLong;
import org.apache.qpid.amqp_1_0.type.messaging.AmqpValue;
public class AmqpValueConstructor extends DescribedTypeConstructor<AmqpValue>
@@ -49,16 +49,7 @@ public class AmqpValueConstructor extends DescribedTypeConstructor<AmqpValue>
public AmqpValue construct(Object underlying)
{
-
- if(underlying instanceof Object)
- {
- return new AmqpValue((Object)underlying);
- }
- else
- {
- // TODO - error
- return null;
- }
+ return new AmqpValue(underlying);
}