You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@commons.apache.org by bu...@apache.org on 2005/05/18 16:14:05 UTC
DO NOT REPLY [Bug 34959] New: -
Overloaded operations throw "wrong number of parameters" exception
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=34959>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.
http://issues.apache.org/bugzilla/show_bug.cgi?id=34959
Summary: Overloaded operations throw "wrong number of parameters"
exception
Product: Commons
Version: 1.1 Final
Platform: All
OS/Version: All
Status: NEW
Severity: blocker
Priority: P1
Component: Modeler
AssignedTo: commons-dev@jakarta.apache.org
ReportedBy: whu@sybase.com
CC: whu@sybase.com
If a model MBean has an overloaded operation (an operation with two or more
signatures), only one of them can be successfully invoked at runtime. Invoking
others will throw "Wrong number of parameters" exception.
Here's what I've found out about the causing of the problem:
Class org.apache.commons.modeler.BaseModelMBean internally stores and caches
operations in a hashmap. The key to the hashmap is the operation name.
Therefore, if an operation has multiple signatures, only one of them (the first
one loaded) is stored in the hashmap. Invoking the same method with a different
signature will cause "wrong number of parameters" exception.
--
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org