Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

为什么Nacos中的很多单例模式类的构造方法不是私有 #8479

Closed
MRGUOKING opened this issue May 29, 2022 · 3 comments
Closed

Comments

@MRGUOKING
Copy link
Contributor

为什么Nacos源码中common模块下的NotifyCenter类,plugin-auth模块下的AuthPluginManager类都是以单例模式来使用,但是构造方法都不是私有的。
image

@KomachiSion
Copy link
Collaborator

应该是社区同学用的IDE自动生成的构造函数,但是没改作用域,可以分析一下哪些是这样的,然后提一个PR改一下。

@MRGUOKING
Copy link
Contributor Author

MRGUOKING commented May 30, 2022

@KomachiSion OK, 我尝试提交一下PR

@tankist141091
Copy link

为什么Nacos源码中common模块下的NotifyCenter类,plugin-auth模块下的AuthPluginManager类都是以单例模式来使用,但是构造方法都不是私有的。 image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants