allnightlong opened SPR-3749 and commented
May be it's possible to have 2 kinds of findMethod() method: public static Method findMethod(Class clazz, String name) public static Method findMethod(Class clazz, String name, Class[] paramTypes)? Or even better, use varargs, as in java.lang.Class.getMethod(String name, Class<?>... parameterTypes). Currently for method with no params, i've forced to inject dummy params like new Class[]{} and i think that is not good style.
By the way, for invokeMethod method in the same class, we've got 2 types of args: invokeMethod(Method method, Object target, Object[] args) invokeMethod(Method method, Object target). It's pretty injustice.
Affects: 2.0.6, 2.1 M3
Comment From: spring-projects-issues
Juergen Hoeller commented
Indeed! Thanks for the suggestion.
Juergen
Comment From: spring-projects-issues
allnightlong commented
Thanks (to be honest, i'm quit impressed with the speed of response)! What's the approximate date of 2.1m4 release?
Comment From: spring-projects-issues
Juergen Hoeller commented
It's just around the corner :-) Both 2.1 M4 and 2.0.7 are scheduled for release by the end of next week (Aug 17).
Juergen
Comment From: gcdd1993
@jhoeller
excuse me. how to find method String#codePointBefore
, i tried
ReflectionUtils.findMethod(String.class, "codePointBefore");
ReflectionUtils.findMethod(String.class, "codePointBefore", Integer.class);
it's not work.
test environment: - jdk11 - spring-core 5.3.12
Comment From: snicoll
@gcdd1993 commenting on a 14+ years old issue isn't a great way to get support. Please review the guidelines for contributing and ask your question on StackOverflow.
Comment From: gcdd1993
@snicoll Thanks for reply. I didn't pay attention to the issue time, i will go to StackOverflow, thanks !