Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8338139 {ClassLoading,Memory}MXBean::isVerbose methods are inconsistent with their setVerbose methods
  3. JDK-8338621

Release Note: The ClassLoadingMXBean and MemoryMXBean isVerbose Methods Are Now Consistent with Their setVerbose Methods

XMLWordPrintable

    • Icon: Sub-task Sub-task
    • Resolution: Delivered
    • Icon: P4 P4
    • 23
    • 8u441-perf, 11.0.25-oracle, 17.0.13-oracle, 21.0.5-oracle, 23
    • core-svc

        The `ClassLoadingMXBean::setVerbose(boolean enabled)` method will set `class+load*` logging on log output `stdout` to level `info` if `enabled` is true, and to level `off` otherwise. In contrast, the `isVerbose` method would check if exactly `class+load` logging was enabled at the `info` level on _any_ log output. This could result in counter-intuitive behavior when logging `class+load=info` to a file via the command-line, as it caused `isVerbose` to return true, even after a call to `setVerbose(false)` had been made. A similar problem existed for the `MemoryMXBean::isVerbose` method. Starting with this release, the behavior is as follows:

        - `ClassLoadingMXBean::isVerbose` will return true only if `class+load*` logging (note the wildcard use) has been enabled at the `info` level (or above) on the `stdout` log output.
        - `MemoryMXBean::isVerbose` will return true only if `gc` logging has been enabled at the `info` level (or above) on the `stdout` log output.

              dholmes David Holmes
              dholmes David Holmes
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Created:
                Updated:
                Resolved: