Author: rgreig
Date: Tue Jan 16 03:14:29 2007
New Revision: 496662
URL: http://svn.apache.org/viewvc?view=rev&rev=496662
Log:
QPID-245 Field table now uses long str type for binary type - temporary interop
hack.
Modified:
incubator/qpid/trunk/qpid/java/common/src/main/java/org/apache/qpid/framing/FieldTable.java
Modified:
incubator/qpid/trunk/qpid/java/common/src/main/java/org/apache/qpid/framing/FieldTable.java
URL:
http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/java/common/src/main/java/org/apache/qpid/framing/FieldTable.java?view=diff&rev=496662&r1=496661&r2=496662
==============================================================================
---
incubator/qpid/trunk/qpid/java/common/src/main/java/org/apache/qpid/framing/FieldTable.java
(original)
+++
incubator/qpid/trunk/qpid/java/common/src/main/java/org/apache/qpid/framing/FieldTable.java
Tue Jan 16 03:14:29 2007
@@ -321,7 +321,7 @@
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 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)