java.jmx

Throw exception when overloaded operation is ambiguous

Details

  • Type: Enhancement Enhancement
  • Status: Reopened Reopened
  • Priority: Minor Minor
  • Resolution: Unresolved
  • Affects Version/s: None
  • Fix Version/s: None
  • Component/s: None
  • 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.

Activity

Hide
Stuart Sierra added a comment -

No, it hasn't been fixed. Commit b76f33a improves the situation but it can still occur.

Show
Stuart Sierra added a comment - No, it hasn't been fixed. Commit b76f33a improves the situation but it can still occur.
Hide
Stuart Sierra added a comment -

This appears to be fixed already on master but not included in a release.

Show
Stuart Sierra added a comment - This appears to be fixed already on master but not included in a release.

People

Vote (0)
Watch (1)

Dates

  • Created:
    Updated: