summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKeith Wall <kwall@apache.org>2012-02-17 13:08:59 +0000
committerKeith Wall <kwall@apache.org>2012-02-17 13:08:59 +0000
commit45b31ddaf3e7b354ab650c458d52aeeaee955c6b (patch)
tree0e84e735c8d267c6a6739dbdbf62614eb583b568
parentc15317d171bcaf0504dcf4c375ba28352fa63eda (diff)
downloadqpid-python-45b31ddaf3e7b354ab650c458d52aeeaee955c6b.tar.gz
QPID-3714: Fix defect in BasicContentHeaderProperties
Fix defect in BasicContentHeaderProperties when deciding whether to use the cached encoded form. git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@1245439 13f79535-47bb-0310-9956-ffa450edef68
-rw-r--r--java/common/src/main/java/org/apache/qpid/framing/BasicContentHeaderProperties.java10
1 files changed, 8 insertions, 2 deletions
diff --git a/java/common/src/main/java/org/apache/qpid/framing/BasicContentHeaderProperties.java b/java/common/src/main/java/org/apache/qpid/framing/BasicContentHeaderProperties.java
index a6883917d5..eb528159c0 100644
--- a/java/common/src/main/java/org/apache/qpid/framing/BasicContentHeaderProperties.java
+++ b/java/common/src/main/java/org/apache/qpid/framing/BasicContentHeaderProperties.java
@@ -88,7 +88,7 @@ public class BasicContentHeaderProperties implements CommonContentHeaderProperti
public int getPropertyListSize()
{
- if(_encodedForm != null && (_headers == null || _headers.isClean()))
+ if(useEncodedForm())
{
return _encodedForm.length;
}
@@ -189,7 +189,7 @@ public class BasicContentHeaderProperties implements CommonContentHeaderProperti
public void writePropertyListPayload(DataOutput buffer) throws IOException
{
- if(_encodedForm != null && (_headers == null || !_headers.isClean()))
+ if(useEncodedForm())
{
buffer.write(_encodedForm);
}
@@ -652,4 +652,10 @@ public class BasicContentHeaderProperties implements CommonContentHeaderProperti
+ _expiration + ",JMSPriority = " + _priority + ",JMSTimestamp = " + _timestamp + ",JMSType = " + _type;
}
+ private boolean useEncodedForm()
+ {
+ return _encodedForm != null && (_headers == null || _headers.isClean());
+ }
+
+
}