Author: ritchiem
Date: Thu Nov 30 04:50:35 2006
New Revision: 480912
URL: http://svn.apache.org/viewvc?view=rev&rev=480912
Log:
QPID-139
When the custom headers are empty no field table would be created. This null
value would cause problems for various methods in AbstractJMSMessage. Simply
create an empty FieldTable to save handling the null value.
Modified:
incubator/qpid/trunk/qpid/java/common/src/main/java/org/apache/qpid/framing/BasicContentHeaderProperties.java
Modified:
incubator/qpid/trunk/qpid/java/common/src/main/java/org/apache/qpid/framing/BasicContentHeaderProperties.java
URL:
http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/java/common/src/main/java/org/apache/qpid/framing/BasicContentHeaderProperties.java?view=diff&rev=480912&r1=480911&r2=480912
==============================================================================
---
incubator/qpid/trunk/qpid/java/common/src/main/java/org/apache/qpid/framing/BasicContentHeaderProperties.java
(original)
+++
incubator/qpid/trunk/qpid/java/common/src/main/java/org/apache/qpid/framing/BasicContentHeaderProperties.java
Thu Nov 30 04:50:35 2006
@@ -241,7 +241,7 @@
}
}
}
-
+
public void populatePropertiesFromBuffer(ByteBuffer buffer, int
propertyFlags, int size)
throws AMQFrameDecodingException
{
@@ -402,6 +402,7 @@
decodeUpToContentType();
}
}
+
public String getContentType()
{
decodeContentTypeIfNecessary();
@@ -431,6 +432,12 @@
public FieldTable getHeaders()
{
decodeHeadersIfNecessary();
+
+ if (_headers == null)
+ {
+ _headers = new FieldTable();
+ }
+
return _headers;
}
@@ -587,6 +594,6 @@
public String toString()
{
- return "reply-to = " + _replyTo + " propertyFlags = " +
_propertyFlags;
+ return "reply-to = " + _replyTo + " propertyFlags = " + _propertyFlags;
}
}