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

CounterMonitorMBean.getDerivedGaugeTimeStamp() JavaDoc incorrectly documents null

XMLWordPrintable

    • Icon: CSR CSR
    • Resolution: Unresolved
    • Icon: P4 P4
    • 26
    • core-svc
    • None
    • behavioral
    • minimal
    • Documentation only change. This method has always returned a long, not a reference.
    • Java API
    • SE

      Summary

      javax.management.monitor.CounterMonitorMBean documents the return value of getDerivedGaugeTimeStamp as possibly returning null, where it should be zero (this a long value).

      Problem

      Simple error in API docs.

      Solution

      Update API docs.

      Specification

      Diff: src/java.management/share/classes/javax/management/monitor/CounterMonitorMBean.java:

      @@ -97,7 +97,7 @@ public interface CounterMonitorMBean extends MonitorMBean {
            *
            * @param object the MBean for which the derived gauge timestamp is to be returned
            * @return The derived gauge timestamp for the specified MBean if this MBean
      -     *         is in the set of observed MBeans, or <code>null</code> otherwise.
      +     *         is in the set of observed MBeans, or <code>0</code> otherwise.
            *
            */
           public long getDerivedGaugeTimeStamp(ObjectName object);

      Github reference: https://github.com/openjdk/jdk/pull/25694

            kevinw Kevin Walls
            webbuggrp Webbug Group
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated: