plusmancn edited a comment on issue #8387: URL: https://github.com/apache/dubbo/issues/8387#issuecomment-895104012
### 3) Redundant method call Furthermore, the findApi method is invoked only once in the same class, is this method really necessary?  ### 4) a1 and a2 will never be null, and the defaultValue of OrderInfo#order is 0. ```java OrderInfo a1 = parseOrder(clazz1); OrderInfo a2 = parseOrder(clazz2); int n1 = a1 == null ? 0 : a1.order; int n2 = a2 == null ? 0 : a2.order; // never return 0 even if n1 equals n2, otherwise, o1 and o2 will override each other in collection like HashSet return n1 > n2 ? 1 : -1; ``` -- 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: notifications-unsubscr...@dubbo.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: notifications-unsubscr...@dubbo.apache.org For additional commands, e-mail: notifications-h...@dubbo.apache.org