You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have searched the issues of this repository and believe that this is not a duplicate.
I have checked the FAQ of this repository and believe that this is not a duplicate.
Environment
Dubbo version: master
Operating System version: macos
Java version: 1.8
movitation:
DubboProtocol#INSTANCE should not be initialized in the constructor
source code:
public DubboProtocol() {
INSTANCE = this;
}
This causes the result of Instance to change every time new DubboProtocol(). Although logically, DubboProtocol is semantically singleton, there is no guarantee that when writing test cases, users will not directly use new DubboProtocol(), so Suggest modifications to avoid potential problems.
In addition, assigning INSTANCE directly to this may cause this escape problem.
The text was updated successfully, but these errors were encountered:
xiaoheng1
added a commit
to xiaoheng1/incubator-dubbo
that referenced
this issue
Jun 1, 2021
Environment
movitation:
DubboProtocol#INSTANCE should not be initialized in the constructor
source code:
This causes the result of Instance to change every time new DubboProtocol(). Although logically, DubboProtocol is semantically singleton, there is no guarantee that when writing test cases, users will not directly use new DubboProtocol(), so Suggest modifications to avoid potential problems.
In addition, assigning INSTANCE directly to this may cause this escape problem.
The text was updated successfully, but these errors were encountered: