[JMX-12] Throw exception when overloaded operation is ambiguous Created: 26/Nov/13 Updated: 20/Dec/13
The clojure.java.jmx/invoke function invokes the first method it finds with a matching name, even if that method's signature does not match the type or number of arguments passed to invoke.
The correct usage is to call invoke-signature, explicitly specifying which method signature to call.
invoke could theoretically examine its arguments and guess the correct signature to call. But without that, it is better to have it throw an exception when the method overloading is ambiguous, instead of just taking the first signature.
|Comment by Stuart Sierra [ 20/Dec/13 10:05 AM ]|
This appears to be fixed already on master but not included in a release.
|Comment by Stuart Sierra [ 20/Dec/13 10:17 AM ]|
No, it hasn't been fixed. Commit b76f33a improves the situation but it can still occur.