diff options
| author | Keith Wall <kwall@apache.org> | 2012-02-17 13:08:59 +0000 |
|---|---|---|
| committer | Keith Wall <kwall@apache.org> | 2012-02-17 13:08:59 +0000 |
| commit | 5c525ddfb2d018bce24cc1489a6343acfd91cc32 (patch) | |
| tree | 7f9ae164db78ab2b665b2a40f45872a6bf93d26f /qpid/java | |
| parent | 98a8aa838dc7de03e2829ada8089985fcbb1c571 (diff) | |
| download | qpid-python-5c525ddfb2d018bce24cc1489a6343acfd91cc32.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@1245439 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'qpid/java')
| -rw-r--r-- | qpid/java/common/src/main/java/org/apache/qpid/framing/BasicContentHeaderProperties.java | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/qpid/java/common/src/main/java/org/apache/qpid/framing/BasicContentHeaderProperties.java b/qpid/java/common/src/main/java/org/apache/qpid/framing/BasicContentHeaderProperties.java index a6883917d5..eb528159c0 100644 --- a/qpid/java/common/src/main/java/org/apache/qpid/framing/BasicContentHeaderProperties.java +++ b/qpid/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()); + } + + } |
