Repository: activemq-artemis Updated Branches: refs/heads/1.x 6d0f28291 -> f492bd978
NO-JIRA Remove Property shouldn't invalidate buffer if not found (cherry picked from commit cf71b7292a06438c341fc3677243772e02b79812) Project: http://git-wip-us.apache.org/repos/asf/activemq-artemis/repo Commit: http://git-wip-us.apache.org/repos/asf/activemq-artemis/commit/f492bd97 Tree: http://git-wip-us.apache.org/repos/asf/activemq-artemis/tree/f492bd97 Diff: http://git-wip-us.apache.org/repos/asf/activemq-artemis/diff/f492bd97 Branch: refs/heads/1.x Commit: f492bd978648edecfbc0cdd378f856e295cf2bde Parents: 6d0f282 Author: Clebert Suconic <[email protected]> Authored: Thu Feb 16 21:03:24 2017 -0500 Committer: Clebert Suconic <[email protected]> Committed: Thu Feb 16 21:05:21 2017 -0500 ---------------------------------------------------------------------- .../activemq/artemis/core/message/impl/MessageImpl.java | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/f492bd97/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/message/impl/MessageImpl.java ---------------------------------------------------------------------- diff --git a/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/message/impl/MessageImpl.java b/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/message/impl/MessageImpl.java index 69e6e65..92dc2c9 100644 --- a/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/message/impl/MessageImpl.java +++ b/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/message/impl/MessageImpl.java @@ -859,9 +859,13 @@ public abstract class MessageImpl implements MessageInternal { @Override public Object removeProperty(final SimpleString key) { - bufferValid = false; + Object oldValue = properties.removeProperty(key); + + if (oldValue != null) { + bufferValid = false; + } - return properties.removeProperty(key); + return oldValue; } @Override
