You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@activemq.apache.org by "ASF GitHub Bot (JIRA)" <ji...@apache.org> on 2018/05/15 15:48:00 UTC
[jira] [Commented] (AMQ-6963) ActiveMQConnection: fix logging for
avoid volatile read in case of different loglevel
[ https://issues.apache.org/jira/browse/AMQ-6963?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16476042#comment-16476042 ]
ASF GitHub Bot commented on AMQ-6963:
-------------------------------------
GitHub user SaivR1t opened a pull request:
https://github.com/apache/activemq/pull/283
AMQ-6963 Fix calling the toString() method in case of different log level.
Avoid calling toString() method in case of different log level, because toString() could create additional objects or could read volatile variable. For example:
org.apache.activemq.ActiveMQConnection#toString (AtomicBoolean)
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/SaivR1t/activemq master
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/activemq/pull/283.patch
To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:
This closes #283
----
commit 191e4ffbe6ce863980f6d239c49589055dd5535b
Author: saivr1t <sa...@...>
Date: 2018-05-15T15:46:36Z
AMQ-6963
Fix calling the toString() method in case of different log level.
----
> ActiveMQConnection: fix logging for avoid volatile read in case of different loglevel
> -------------------------------------------------------------------------------------
>
> Key: AMQ-6963
> URL: https://issues.apache.org/jira/browse/AMQ-6963
> Project: ActiveMQ
> Issue Type: Improvement
> Reporter: Alexander Savonin
> Priority: Minor
> Fix For: 5.16.0
>
>
> Just a little improvement for ActiveMQConnection to preventing of call the 'toString()' method in case of different log level, because toString() could create additional objects or could read volatile variable. For example:
> org.apache.activemq.ActiveMQConnection#toString (AtomicBoolean)
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)