Uploaded image for project: 'Commons Modeler'
  1. Commons Modeler
  2. MODELER-4

[modeler] Overloaded operations throw "wrong number of parameters" exception

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 1.1
    • 2.0
    • None
    • Operating System: All
      Platform: All

    • 34959

    Description

      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.

      Attachments

        Activity

          People

            Unassigned Unassigned
            whu@sybase.com Joe Hu
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: