funky-eyes commented on code in PR #7794:
URL: https://github.com/apache/incubator-seata/pull/7794#discussion_r2558213067
##########
common/src/main/java/org/apache/seata/common/util/ReflectionUtil.java:
##########
@@ -705,6 +705,45 @@ public static Map<String, Object>
getAnnotationValues(Annotation annotation) thr
return getFieldValue(h, "memberValues");
}
+ /**
+ *
+ * @param targetClass the target class
+ * @param methodName the method name
+ * @param paramTypes the param types
+ * @param annotationClass the annotation class
+ * @return the annotation
+ * @param <A>
+ */
+ public static <A extends Annotation> A findAnnotationInHierarchy(
Review Comment:
I believe method-level annotation data should take precedence. Only if a
method does not have that annotation should we check the corresponding method
in the superclass. This ensures that if the same annotation appears with
different configured values, the value on the method is the one that ultimately
applies.
--
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]