Clojure

Reflector error messages can be improved when no matching method is found.

Details

  • Type: Enhancement Enhancement
  • Status: Open Open
  • Priority: Major Major
  • Resolution: Unresolved
  • Affects Version/s: Release 1.3
  • Fix Version/s: None
  • Component/s: None
  • Labels:
  • Environment:
    All
  • Patch:
    Code

Description

When accessing a java method with an arity mismatch or a mismatched parameter type, Reflector.java returns the following error on REPL:
IllegalArgumentException No matching method found: xyz for class com.abc.MyClass

eventhough method xyz might exist on MyClass, but was being called with the wrong number of arguments.

Attached is a patch that fixes that problem.

Activity

Hide
Andy Fingerhut added a comment -

diff.patch of Nov 27, 2011 does not apply cleanly to latest master version of Clojure code (using "patch -p1 < diff.patch", at least). It is preferred by Clojure team that patches are in git format-patch format. Instructions for producing such a patch are given at http://clojure.org/patches

Rahul, are you planning to sign a Clojure Contributor Agreement? Without that, this code cannot be included in Clojure, unless a contributor reimplements it on their own.

Show
Andy Fingerhut added a comment - diff.patch of Nov 27, 2011 does not apply cleanly to latest master version of Clojure code (using "patch -p1 < diff.patch", at least). It is preferred by Clojure team that patches are in git format-patch format. Instructions for producing such a patch are given at http://clojure.org/patches Rahul, are you planning to sign a Clojure Contributor Agreement? Without that, this code cannot be included in Clojure, unless a contributor reimplements it on their own.
Hide
Andy Fingerhut added a comment -

In private communication with the patch author today, he expressed an interest in submitting a signed CA so this patch can be considered for inclusion in Clojure.

Show
Andy Fingerhut added a comment - In private communication with the patch author today, he expressed an interest in submitting a signed CA so this patch can be considered for inclusion in Clojure.
Hide
Kevin Downey added a comment -

it has been two years, is there a CA to go with this patch yet?

Show
Kevin Downey added a comment - it has been two years, is there a CA to go with this patch yet?
Hide
Andy Fingerhut added a comment -

The patch author has not submitted a CA – their name is not listed at http://clojure.org/contributing

Everyone else is free to submit a patch if they wish.

Show
Andy Fingerhut added a comment - The patch author has not submitted a CA – their name is not listed at http://clojure.org/contributing Everyone else is free to submit a patch if they wish.

People

Vote (1)
Watch (1)

Dates

  • Created:
    Updated: