[ 
https://issues.apache.org/jira/browse/AMQ-7402?focusedWorklogId=385714&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-385714
 ]

ASF GitHub Bot logged work on AMQ-7402:
---------------------------------------

                Author: ASF GitHub Bot
            Created on: 12/Feb/20 08:01
            Start Date: 12/Feb/20 08:01
    Worklog Time Spent: 10m 
      Work Description: coheigea commented on 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:
[email protected]


Issue Time Tracking
-------------------

    Worklog Id:     (was: 385714)
    Time Spent: 40m  (was: 0.5h)

> Inconsistent synchronization of getter/setter of some classes
> -------------------------------------------------------------
>
>                 Key: AMQ-7402
>                 URL: https://issues.apache.org/jira/browse/AMQ-7402
>             Project: ActiveMQ
>          Issue Type: Bug
>          Components: Broker, JMS client, KahaDB
>    Affects Versions: 5.15.11
>            Reporter: Pascal Schumacher
>            Assignee: Jean-Baptiste Onofré
>            Priority: Minor
>             Fix For: 5.16.0, 5.15.12
>
>          Time Spent: 40m
>  Remaining Estimate: 0h
>
> There are some classes where the get method is synchronzied by the set method 
> is not (or the other way around).
> Therefore calls may return a inconsistent state for the object.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to