This is an automated email from the ASF dual-hosted git repository.
albumenj pushed a commit to branch 3.2
in repository https://gitbox.apache.org/repos/asf/dubbo.git
The following commit(s) were added to refs/heads/3.2 by this push:
new c5efc65a99 Remove sync lock for lazy target (#13220)
c5efc65a99 is described below
commit c5efc65a99cab6d558bcff704fd76ba0f008e353
Author: Albumen Kevin <[email protected]>
AuthorDate: Wed Oct 18 11:52:28 2023 +0800
Remove sync lock for lazy target (#13220)
---
.../dubbo/config/spring/util/LazyTargetInvocationHandler.java | 6 +-----
1 file changed, 1 insertion(+), 5 deletions(-)
diff --git
a/dubbo-config/dubbo-config-spring/src/main/java/org/apache/dubbo/config/spring/util/LazyTargetInvocationHandler.java
b/dubbo-config/dubbo-config-spring/src/main/java/org/apache/dubbo/config/spring/util/LazyTargetInvocationHandler.java
index cb414f93f0..043c86a612 100644
---
a/dubbo-config/dubbo-config-spring/src/main/java/org/apache/dubbo/config/spring/util/LazyTargetInvocationHandler.java
+++
b/dubbo-config/dubbo-config-spring/src/main/java/org/apache/dubbo/config/spring/util/LazyTargetInvocationHandler.java
@@ -47,11 +47,7 @@ public class LazyTargetInvocationHandler implements
InvocationHandler {
}
if (target == null) {
- synchronized (this) {
- if (target == null) {
- target = lazyTargetSource.getTarget();
- }
- }
+ target = lazyTargetSource.getTarget();
}
if (method.getDeclaringClass().isInstance(target)) {
try {