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

Remove the jmx.invoke.getters compatibility property

XMLWordPrintable

    • Icon: CSR CSR
    • Resolution: Approved
    • Icon: P4 P4
    • 25
    • core-svc
    • None
    • behavioral
    • minimal
    • Very old property for compatibility with pre-JDK 6 code.
    • System or security property
    • Implementation

      Summary

      Remove the System Property "jmx.invoke.getters". This was introduced in JDK 6 for compatibility with code which may have depended on some previous incorrect behaviour. It was intended to be removed later. Removal is long overdue.

      Problem

      The System Property "jmx.invoke.getters" was added in JDK-4949203 to optionally be compatible with a time before JDK-6, when calling invoke on getters and setters was permitted.

      This correct behaviour was documented at the time in https://docs.oracle.com/javase/6/docs/technotes/guides/jmx/enhancements.html : "getters and setters in a Standard MBean cannot be invoked through MBeanServer.invoke"

      JDK-4949203 also states: "Having such a property is a violation of compatibility rules so it will be phased out in the future."

      Solution

      Remove the code that reads the System Property "jmx.invoke.getters", the conditions related to it, and update tests.

      New behaviour will be the same as current behaviour with the property unset.

      Specification

      No specification change. Property is not documented in the JDK.

      Github PR for reference: https://github.com/openjdk/jdk/pull/23132

            kevinw Kevin Walls
            kevinw Kevin Walls
            Serguei Spitsyn
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: