<< 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
Environment:

clojure.java.jmx 0.2.0



 Description   

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.



 Comments   
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 Sat Nov 22 17:58:51 CST 2014 using JIRA 4.4#649-r158309.