<< Back to previous view

[CLJ-884] Reflector error messages can be improved when no matching method is found. Created: 27/Nov/11  Updated: 18/Apr/14  Resolved: 18/Apr/14

Status: Closed
Project: Clojure
Component/s: None
Affects Version/s: Release 1.3
Fix Version/s: None

Type: Enhancement Priority: Major
Reporter: Rahul Pilani Assignee: Unassigned
Resolution: Duplicate Votes: 1
Labels: errormsgs
Environment:

All


Attachments: Text File diff.patch    
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.



 Comments   
Comment by Andy Fingerhut [ 22/Mar/12 8:47 PM ]

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.

Comment by Andy Fingerhut [ 23/Mar/12 1:14 AM ]

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.

Comment by Kevin Downey [ 17/Apr/14 10:48 PM ]

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

Comment by Andy Fingerhut [ 18/Apr/14 2:01 AM ]

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.

Comment by Alex Miller [ 18/Apr/14 7:40 AM ]

I think CLJ-1130 is the same issue and it is much farther along in the process.

Generated at Fri Oct 24 15:30:24 CDT 2014 using JIRA 4.4#649-r158309.