reta commented on PR #1784: URL: https://github.com/apache/cxf/pull/1784#issuecomment-2040643978
> If you run this locally the BeanspectorTests pass with the exception of testMismatchedOverriddenBeans which fails the expected IllegalArg exception since we do not get tripped up by ordering. OK, I think I figured possible solution, curious what do you think. The idea is very simple - make sure the declared methods go first (so the methods that are declared by the class itself are checked first). Before processing, the methods are ordered by declaring class: ``` List<Method> methods = Arrays.asList(tclass.getMethods()); Collections.sort(methods, (m1, m2) -> { if (m1.getDeclaringClass().equals(m2.getDeclaringClass())) { return 0; } else if (m1.getDeclaringClass().equals(tclass)) { return -1; } else { return 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: dev-unsubscr...@cxf.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org