Closed pranasblk closed 7 years ago
Current work around: access.getIndex(getterName, new Class[] {})
and fall back to (for more similar potential issus): final Method reflect = clazz.getDeclaredMethod(getterName); return reflect.invoke(e);
Per the javadocs, getIndex(String)
"Returns the index of the first method with the specified name." You need to specify the parameters if your method has multiple names. It may be nice to sort the methods by number of arguments, please feel free to make a PR if you'd like that.
There are 2 methods:
Actual result: MethodAccess.getIndex("getStrategyName") picks up the incorrect one.
Expected result: Index of second definition must be retrieved if no parameters specified.