You are viewing a plain text version of this content. The canonical link for it is here.
Posted to gitbox@activemq.apache.org by GitBox <gi...@apache.org> on 2020/02/12 08:01:41 UTC

[GitHub] [activemq] coheigea commented on a change in pull request #449: AMQ-7402: Inconsistent synchronization of getters/setters of some cla…

coheigea commented on a change in pull request #449: AMQ-7402: Inconsistent synchronization of getters/setters of some cla…
URL: https://github.com/apache/activemq/pull/449#discussion_r378089089
 
 

 ##########
 File path: activemq-kahadb-store/src/main/java/org/apache/activemq/store/kahadb/disk/index/HashIndex.java
 ##########
 @@ -383,7 +383,7 @@ int indexFor(Key x, int length) {
     // Property Accessors
     // /////////////////////////////////////////////////////////////////
 
-    public Marshaller<Key> getKeyMarshaller() {
+    public synchronized Marshaller<Key> getKeyMarshaller() {
 
 Review comment:
   Instead remove synchronized from the setter, and make the variable volatile

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services