[
https://issues.apache.org/jira/browse/AMQ-7402?focusedWorklogId=385713&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-385713
]
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_r378088857
##########
File path:
activemq-client/src/main/java/org/apache/activemq/management/SizeStatisticImpl.java
##########
@@ -87,7 +87,7 @@ public synchronized void setTotalSize(long size) {
/**
* @return the maximum size of any step
*/
- public long getMaxSize() {
+ public synchronized long getMaxSize() {
Review comment:
For Max + Min Size, I think synchronized should be removed from the setter
methods and just make the variables volatile instead.
----------------------------------------------------------------
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: 385713)
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)