diff options
Diffstat (limited to 'qpid/java/common/src/main/java/org/apache/qpid/framing/FieldTable.java')
-rw-r--r-- | qpid/java/common/src/main/java/org/apache/qpid/framing/FieldTable.java | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/qpid/java/common/src/main/java/org/apache/qpid/framing/FieldTable.java b/qpid/java/common/src/main/java/org/apache/qpid/framing/FieldTable.java index 9b2f9b3969..341238c667 100644 --- a/qpid/java/common/src/main/java/org/apache/qpid/framing/FieldTable.java +++ b/qpid/java/common/src/main/java/org/apache/qpid/framing/FieldTable.java @@ -131,9 +131,10 @@ public class FieldTable } else if ((_encodedForm != null) && (val != null)) { - EncodingUtils.writeShortStringBytes(_encodedForm, key); - val.writeToBuffer(_encodedForm); - + // We have updated data to store in the buffer + // So clear the _encodedForm to allow it to be rebuilt later + // this is safer than simply appending to any existing buffer. + _encodedForm = null; } else if (val == null) { |