summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobert Greig <rgreig@apache.org>2007-01-16 11:14:29 +0000
committerRobert Greig <rgreig@apache.org>2007-01-16 11:14:29 +0000
commitf5032290250d66a61925de1aebd29eac051f364e (patch)
treeca99192f7e179f9044bdda525c127064f4f48eac
parent197dc3f5d911c79787cfbaf4dfd75d7ac8c6a5df (diff)
downloadqpid-python-f5032290250d66a61925de1aebd29eac051f364e.tar.gz
QPID-245 Field table now uses long str type for binary type - temporary interop hack.
git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk@496662 13f79535-47bb-0310-9956-ffa450edef68
-rw-r--r--qpid/java/common/src/main/java/org/apache/qpid/framing/FieldTable.java6
1 files changed, 4 insertions, 2 deletions
diff --git a/qpid/java/common/src/main/java/org/apache/qpid/framing/FieldTable.java b/qpid/java/common/src/main/java/org/apache/qpid/framing/FieldTable.java
index 118de0fbbc..db3a5851ab 100644
--- a/qpid/java/common/src/main/java/org/apache/qpid/framing/FieldTable.java
+++ b/qpid/java/common/src/main/java/org/apache/qpid/framing/FieldTable.java
@@ -321,7 +321,7 @@ public class FieldTable
public byte[] getBytes(AMQShortString string)
{
AMQTypedValue value = getProperty(string);
- if (value != null && (value.getType() == AMQType.BINARY))
+ if (value != null && (value.getType() == AMQType.BINARY || value.getType() == AMQType.LONG_STRING))
{
return (byte[]) value.getValue();
}
@@ -497,7 +497,9 @@ public class FieldTable
public Object setBytes(AMQShortString string, byte[] bytes)
{
checkPropertyName(string);
- return setProperty(string, AMQType.BINARY.asTypedValue(bytes));
+ // HACK for interop
+ //return setProperty(string, AMQType.BINARY.asTypedValue(bytes));
+ return setProperty(string, AMQType.LONG_STRING.asTypedValue(bytes));
}
public Object setBytes(String string, byte[] bytes, int start, int length)