<< Back to previous view

[JMX-12] Throw exception when overloaded operation is ambiguous Created: 26/Nov/13  Updated: 20/Dec/13

Status: Reopened
Project: java.jmx
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Enhancement Priority: Minor
Reporter: Stuart Sierra Assignee: Unassigned
Resolution: Unresolved Votes: 0
Labels: None

clojure.java.jmx 0.2.0


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.

Generated at Fri Jan 19 16:04:49 CST 2018 using JIRA 4.4#649-r158309.