You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@qpid.apache.org by kw...@apache.org on 2012/02/17 14:09:00 UTC

svn commit: r1245439 - /qpid/trunk/qpid/java/common/src/main/java/org/apache/qpid/framing/BasicContentHeaderProperties.java

Author: kwall
Date: Fri Feb 17 13:08:59 2012
New Revision: 1245439

URL: http://svn.apache.org/viewvc?rev=1245439&view=rev
Log:
QPID-3714: Fix defect in BasicContentHeaderProperties

Fix defect in BasicContentHeaderProperties when deciding whether to use the cached encoded form.

Modified:
    qpid/trunk/qpid/java/common/src/main/java/org/apache/qpid/framing/BasicContentHeaderProperties.java

Modified: qpid/trunk/qpid/java/common/src/main/java/org/apache/qpid/framing/BasicContentHeaderProperties.java
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/java/common/src/main/java/org/apache/qpid/framing/BasicContentHeaderProperties.java?rev=1245439&r1=1245438&r2=1245439&view=diff
==============================================================================
--- qpid/trunk/qpid/java/common/src/main/java/org/apache/qpid/framing/BasicContentHeaderProperties.java (original)
+++ qpid/trunk/qpid/java/common/src/main/java/org/apache/qpid/framing/BasicContentHeaderProperties.java Fri Feb 17 13:08:59 2012
@@ -88,7 +88,7 @@ public class BasicContentHeaderPropertie
 
     public int getPropertyListSize()
     {
-        if(_encodedForm != null && (_headers == null || _headers.isClean()))
+        if(useEncodedForm())
         {
             return _encodedForm.length;
         }
@@ -189,7 +189,7 @@ public class BasicContentHeaderPropertie
 
     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 BasicContentHeaderPropertie
             + _expiration + ",JMSPriority = " + _priority + ",JMSTimestamp = " + _timestamp + ",JMSType = " + _type;
     }
 
+    private boolean useEncodedForm()
+    {
+        return _encodedForm != null && (_headers == null || _headers.isClean());
+    }
+
+
 }



---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project:      http://qpid.apache.org
Use/Interact: mailto:commits-subscribe@qpid.apache.org