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 92dc2c9fc2..69e6e6520b 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,13 +859,9 @@ public abstract class MessageImpl implements MessageInternal { @Override public Object removeProperty(final SimpleString key) { - Object oldValue = properties.removeProperty(key); + bufferValid = false; - if (oldValue != null) { - bufferValid = false; - } - - return oldValue; + return properties.removeProperty(key); } @Override