Community
Participate
Working Groups
The current implementation of getDeclaredPublicMethods(Class) filter nonpublic methods by replacing them with null. There is no indication of this behavior and this is not what a consumer of this method would expect. For this class: public static class MyBean { public Long getId() { return null; } private void myMethod() { } public void setId(Long id) { } } The expected result is [ public void MyBean.getId(), public void MyBean setId() ] And not (current implemtation): [ public void MyBean.getId(), null, public void MyBean setId() ] There is no guarantee that the SDK do not add some additional private methods. I had a case with a private method added by test coverage tool). The array length was no longer as expected in my test.
Patch published on GitHub: https://github.com/BSI-Business-Systems-Integration-AG/scout.rt/commit/1ec5e377847d1e13de568671c049eb40a0c0269b
Patch reviewed and merged by Ken Lee for 3.9.0 M6.
Verified, unit test work as expected. Other unit test from bug 402301 also work when code is instrumented with additional private methods.
Bug closed, shipped with 3.9.0 (Kepler)