Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-6177524

MBeanServerInvocationHandler should not forward Object methods to proxied MBean

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: P3
    • Resolution: Fixed
    • Affects Version/s: 5.0, 6
    • Fix Version/s: 6
    • Component/s: core-svc
    • Subcomponent:
    • Resolved In Build:
      b23
    • CPU:
      generic, x86
    • OS:
      generic, windows_xp

      Description

      MBeanServerInvocationHandler is specified to forward the methods hashCode(), toString(), and equals(Object) to the proxied MBean. This is basically never what you want, and in particular means that you cannot reasonably use an MBean proxy as a key in a HashMap (for example to look up a cached MBeanInfo for the proxy). MBeanServerInvocationHandler should only forward these methods if they are explicitly mentioned in the MBean interface for which it is a handler. This can be discovered by reflecting on the class of the proxy parameter to MBeanServerInvocationHandler.invoke. Its first superinterface will be the MBean interface, and it can be examined to see whether it contains the method in question.
      ###@###.### 10/12/04 11:07 GMT

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                sjiang Shanliang Jiang (Inactive)
                Reporter:
                emcmanus Eamonn McManus
              • Votes:
                0 Vote for this issue
                Watchers:
                0 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Imported:
                  Indexed: