activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From clebertsuco...@apache.org
Subject activemq-artemis git commit: NO-JIRA Remove Property shouldn't invalidate buffer if not found
Date Fri, 17 Feb 2017 02:05:06 GMT
Repository: activemq-artemis
Updated Branches:
  refs/heads/master bcecda73f -> cf71b7292


NO-JIRA Remove Property shouldn't invalidate buffer if not found


Project: http://git-wip-us.apache.org/repos/asf/activemq-artemis/repo
Commit: http://git-wip-us.apache.org/repos/asf/activemq-artemis/commit/cf71b729
Tree: http://git-wip-us.apache.org/repos/asf/activemq-artemis/tree/cf71b729
Diff: http://git-wip-us.apache.org/repos/asf/activemq-artemis/diff/cf71b729

Branch: refs/heads/master
Commit: cf71b7292a06438c341fc3677243772e02b79812
Parents: bcecda7
Author: Clebert Suconic <clebertsuconic@apache.org>
Authored: Thu Feb 16 21:03:24 2017 -0500
Committer: Clebert Suconic <clebertsuconic@apache.org>
Committed: Thu Feb 16 21:03:38 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/cf71b729/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 f93086c..5d99da6 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


Mime
View raw message