diff options
| author | Robert Godfrey <rgodfrey@apache.org> | 2008-02-13 14:01:26 +0000 |
|---|---|---|
| committer | Robert Godfrey <rgodfrey@apache.org> | 2008-02-13 14:01:26 +0000 |
| commit | 62ef6db190b842c39a7101a0d108c28554171b1b (patch) | |
| tree | 3d3428aff137d5928ca3a3125d72c1b9bd38dfee /java | |
| parent | 855aa3ce41f07c28071cebde64df12349bdcec51 (diff) | |
| download | qpid-python-62ef6db190b842c39a7101a0d108c28554171b1b.tar.gz | |
QPID-789 : FieldTable putDataInBuffer method not thread safe
git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/branches/M2.1@627416 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'java')
| -rw-r--r-- | java/common/src/main/java/org/apache/qpid/framing/FieldTable.java | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/java/common/src/main/java/org/apache/qpid/framing/FieldTable.java b/java/common/src/main/java/org/apache/qpid/framing/FieldTable.java index 55968ffe19..7f851ab264 100644 --- a/java/common/src/main/java/org/apache/qpid/framing/FieldTable.java +++ b/java/common/src/main/java/org/apache/qpid/framing/FieldTable.java @@ -898,13 +898,15 @@ public class FieldTable if (_encodedForm != null) { - if (_encodedForm.position() != 0) + ByteBuffer encodedForm = _encodedForm.duplicate(); + + if (encodedForm.position() != 0) { - _encodedForm.flip(); + encodedForm.flip(); } // _encodedForm.limit((int)getEncodedSize()); - buffer.put(_encodedForm); + buffer.put(encodedForm); } else if (_properties != null) { |
