This is an automated email from the ASF dual-hosted git repository.
xiaoyu pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-shenyu.git
The following commit(s) were added to refs/heads/master by this push:
new 83f2aca [ISSUE #2812] synchronized instance rather then class (#2813)
83f2aca is described below
commit 83f2aca04c35938c06ff0e755426cf826f884d99
Author: dragon-zhang <[email protected]>
AuthorDate: Wed Jan 26 15:30:06 2022 +0800
[ISSUE #2812] synchronized instance rather then class (#2813)
* fix npe
* synchronized instance rather then class
* Revert "fix npe"
---
.../shenyu/admin/disruptor/subscriber/MetadataExecutorSubscriber.java | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git
a/shenyu-admin/src/main/java/org/apache/shenyu/admin/disruptor/subscriber/MetadataExecutorSubscriber.java
b/shenyu-admin/src/main/java/org/apache/shenyu/admin/disruptor/subscriber/MetadataExecutorSubscriber.java
index 2b043aa..b7d9e2a 100644
---
a/shenyu-admin/src/main/java/org/apache/shenyu/admin/disruptor/subscriber/MetadataExecutorSubscriber.java
+++
b/shenyu-admin/src/main/java/org/apache/shenyu/admin/disruptor/subscriber/MetadataExecutorSubscriber.java
@@ -47,7 +47,7 @@ public class MetadataExecutorSubscriber implements
ExecutorTypeSubscriber<MetaDa
for (MetaDataRegisterDTO metaDataRegisterDTO :
metaDataRegisterDTOList) {
ShenyuClientRegisterService shenyuClientRegisterService =
this.shenyuClientRegisterService.get(metaDataRegisterDTO.getRpcType());
Objects.requireNonNull(shenyuClientRegisterService);
- synchronized (ShenyuClientRegisterService.class) {
+ synchronized (shenyuClientRegisterService) {
shenyuClientRegisterService.register(metaDataRegisterDTO);
}
}