You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@activemq.apache.org by jb...@apache.org on 2018/09/26 21:07:08 UTC
[1/2] activemq-artemis git commit: ARTEMIS-2099 Avoid possible double
instantiation of properties
Repository: activemq-artemis
Updated Branches:
refs/heads/master 10ecb358c -> 5a600114b
ARTEMIS-2099 Avoid possible double instantiation of properties
Project: http://git-wip-us.apache.org/repos/asf/activemq-artemis/repo
Commit: http://git-wip-us.apache.org/repos/asf/activemq-artemis/commit/8ab3be71
Tree: http://git-wip-us.apache.org/repos/asf/activemq-artemis/tree/8ab3be71
Diff: http://git-wip-us.apache.org/repos/asf/activemq-artemis/diff/8ab3be71
Branch: refs/heads/master
Commit: 8ab3be71a3ebc5667c402c2b6e6458cb73bce616
Parents: 10ecb35
Author: Michael André Pearce <mi...@me.com>
Authored: Wed Sep 26 21:11:24 2018 +0100
Committer: Justin Bertram <jb...@apache.org>
Committed: Wed Sep 26 15:40:36 2018 -0500
----------------------------------------------------------------------
.../artemis/core/message/impl/CoreMessage.java | 14 +++++++++-----
1 file changed, 9 insertions(+), 5 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/8ab3be71/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/message/impl/CoreMessage.java
----------------------------------------------------------------------
diff --git a/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/message/impl/CoreMessage.java b/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/message/impl/CoreMessage.java
index cc79c2c..b548b29 100644
--- a/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/message/impl/CoreMessage.java
+++ b/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/message/impl/CoreMessage.java
@@ -551,12 +551,16 @@ public class CoreMessage extends RefCountMessage implements ICoreMessage {
*/
protected TypedProperties checkProperties() {
if (properties == null) {
- TypedProperties properties = new TypedProperties();
- if (buffer != null && propertiesLocation >= 0) {
- final ByteBuf byteBuf = buffer.duplicate().readerIndex(propertiesLocation);
- properties.decode(byteBuf, coreMessageObjectPools == null ? null : coreMessageObjectPools.getPropertiesDecoderPools());
+ synchronized (this) {
+ if (properties == null) {
+ TypedProperties properties = new TypedProperties();
+ if (buffer != null && propertiesLocation >= 0) {
+ final ByteBuf byteBuf = buffer.duplicate().readerIndex(propertiesLocation);
+ properties.decode(byteBuf, coreMessageObjectPools == null ? null : coreMessageObjectPools.getPropertiesDecoderPools());
+ }
+ this.properties = properties;
+ }
}
- this.properties = properties;
}
return this.properties;
[2/2] activemq-artemis git commit: This closes #2335
Posted by jb...@apache.org.
This closes #2335
Project: http://git-wip-us.apache.org/repos/asf/activemq-artemis/repo
Commit: http://git-wip-us.apache.org/repos/asf/activemq-artemis/commit/5a600114
Tree: http://git-wip-us.apache.org/repos/asf/activemq-artemis/tree/5a600114
Diff: http://git-wip-us.apache.org/repos/asf/activemq-artemis/diff/5a600114
Branch: refs/heads/master
Commit: 5a600114b4e1bf964292d677baf5ce2f56c859f9
Parents: 10ecb35 8ab3be7
Author: Justin Bertram <jb...@apache.org>
Authored: Wed Sep 26 15:41:10 2018 -0500
Committer: Justin Bertram <jb...@apache.org>
Committed: Wed Sep 26 15:41:10 2018 -0500
----------------------------------------------------------------------
.../artemis/core/message/impl/CoreMessage.java | 14 +++++++++-----
1 file changed, 9 insertions(+), 5 deletions(-)
----------------------------------------------------------------------