zookeeper-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "TisonKun (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (ZOOKEEPER-3497) org.apache.zookeeper.jmx.MBeanRegistry 单例 构造函数没有私有化
Date Fri, 09 Aug 2019 00:28:00 GMT

    [ https://issues.apache.org/jira/browse/ZOOKEEPER-3497?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16903437#comment-16903437
] 

TisonKun commented on ZOOKEEPER-3497:
-------------------------------------

Yep. If you want to provide a fix to this issue, I can help you ping some of our committer
to grant you contributor permission and you can assign the issue to yourself and work on it.
What do you think?

Besides, the common language of our community is English so it would be helpful you translate
the issue into English. Also I'm glad to do it if you have any difficulty.

> org.apache.zookeeper.jmx.MBeanRegistry 单例 构造函数没有私有化
> ---------------------------------------------------
>
>                 Key: ZOOKEEPER-3497
>                 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-3497
>             Project: ZooKeeper
>          Issue Type: Improvement
>          Components: jmx
>    Affects Versions: 3.6.0
>            Reporter: jwhao
>            Priority: Minor
>
> org.apache.zookeeper.jmx.MBeanRegistry
> 此类使用单例模式实现,项目中其他模块也没有手动new此类,但是此类的构造函数没有私有化
> public MBeanRegistry () {
>     try {
>         mBeanServer = ManagementFactory.getPlatformMBeanServer(); 
>     } catch (Error e) {
>         // Account for running within IKVM and create a new MBeanServer
>         // if the PlatformMBeanServer does not exist.
>         mBeanServer = MBeanServerFactory.createMBeanServer();
>     }
> }



--
This message was sent by Atlassian JIRA
(v7.6.14#76016)

Mime
View raw message