[
https://issues.apache.org/jira/browse/ARTEMIS-4968?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Justin Bertram resolved ARTEMIS-4968.
-------------------------------------
Assignee: Justin Bertram
Resolution: Invalid
In my opinion this is a false positive. The {{start}} and {{stop}} methods use
{{synchronized}} blocks to ensure the consistency of {{isStarted}}. It's not
directly to protect access to {{mBeanServer}}.
> The getManagementConnector method returns the value of the mBeanServer field,
> which can be changed in the start and stop methods.
> ---------------------------------------------------------------------------------------------------------------------------------
>
> Key: ARTEMIS-4968
> URL: https://issues.apache.org/jira/browse/ARTEMIS-4968
> Project: ActiveMQ Artemis
> Issue Type: Bug
> Reporter: Suhov Roman
> Assignee: Justin Bertram
> Priority: Major
>
> File:
> [https://github.com/apache/activemq-artemis/blob/main/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/management/ManagementContext.java]
> Line: 113 - 116
> The getManagementConnector method returns the value of the mBeanServer field,
> which can be changed in the start and stop methods. These methods are already
> synchronized to prevent race conditions when accessing the mBeanServer field.
> However, to ensure thread safety when reading this field, the
> getManagementConnector method must also be synchronized.
> public synchronized ManagementConnector getManagementConnector()
> {
> return mBeanServer;
> }
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
For further information, visit: https://activemq.apache.org/contact