Open GoogleCodeExporter opened 8 years ago
Looking at it more closely in my case (2 static methods but the bug can be
reproduced with member methods) the stack is :
- bsh.Reflect.gatherMethodsRecursive(baseClass, methodName, types.length,
publicMethods, nonPublicMethods) returns the 2 methods "inputDialog" in a
random order (reflection makes no guaranty on the order)
- the 2 methods are passed in to bsh.Reflect.findMostSpecificMethod(Class[]
idealMatch, List<Method> methods)
- this one calls bsh.Reflect.findMostSpecificSignature(Class[] idealMatch,
Class[][] candidates) and this one sometimes makes the bad choice.
Regarding the unit test upper, you can add a giant loop around (e.g. 10000
loops) to increase the chance of failure and you should see that sometimes the
test is OK and sometimes fails.
Original comment by dupuy.ol...@gmail.com
on 14 Nov 2012 at 2:32
Original issue reported on code.google.com by
dupuy.ol...@gmail.com
on 12 Nov 2012 at 9:43