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

MXBeanException.java assumes the existence of a pool that doesn't support usage threshold

    Details

    • Type: Enhancement
    • Status: Closed
    • Priority: P4
    • Resolution: Won't Fix
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: core-svc
    • Labels:
      None

      Description

      The tests searches for a MemoryPoolMXBean that returns false for isUsageThresholdSupported(), and then uses one of those pools to trigger UnsupportedOperationExceptions when setUsageThreshold is used.

      ZGC doesn't provide a pool that doesn't support usage threshold, and the test therefore throws an NPE.

      The suggested fix is to add:
              if (pool == null) {
                return; // All pools support usage threshold
              }

      An alternative fix would be to filter out the test if ZGC is used.

        Attachments

          Activity

            People

            • Assignee:
              stefank Stefan Karlsson
              Reporter:
              stefank Stefan Karlsson
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: