AlbumenJ commented on code in PR #15164:
URL: https://github.com/apache/dubbo/pull/15164#discussion_r1974632995


##########
dubbo-common/src/main/java/org/apache/dubbo/common/bytecode/Wrapper.java:
##########
@@ -112,16 +112,17 @@ public Object invokeMethod(Object instance, String mn, 
Class<?>[] types, Object[
      * @return Wrapper instance(not null).
      */
     public static Wrapper getWrapper(Class<?> c) {
-        while (ClassGenerator.isDynamicClass(c)) // can not wrapper on dynamic 
class.
-        {
-            c = c.getSuperclass();
-        }
-
-        if (c == Object.class) {
-            return OBJECT_WRAPPER;
-        }
+        return ConcurrentHashMapUtils.computeIfAbsent(WRAPPER_MAP, c, (clazz) 
-> {
+            while (ClassGenerator.isDynamicClass(clazz)) // can not wrapper on 
dynamic class.
+            {
+                clazz = clazz.getSuperclass();
+            }
 
-        return ConcurrentHashMapUtils.computeIfAbsent(WRAPPER_MAP, c, 
Wrapper::makeWrapper);
+            if (clazz == Object.class) {
+                return OBJECT_WRAPPER;
+            }
+            return makeWrapper(clazz);
+        });

Review Comment:
   Why change this?



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to