JDK-8242431 : Correct links in javadoc of OperatingSystemMXBean
  • Type: CSR
  • Component: core-svc
  • Sub-Component: java.lang.management
  • Priority: P4
  • Status: Closed
  • Resolution: Approved
  • Fix Versions: 15
  • Submitted: 2020-04-09
  • Updated: 2020-04-09
  • Resolved: 2020-04-09
Related Reports
CSR :  
Description
Summary
-------

Update `com.sun.management.OperatingSystemMXBean` class to correct the links in the javadoc.

Problem
-------

Current javadoc for method `getTotalPhysicalMemorySize()` uses links to non-existing method `getMemorySize()` instead of links to method `getTotalMemorySize()`.

Solution
--------

Update javadoc for method `getTotalPhysicalMemorySize()` to replace links to `getMemorySize()` method with links to method `getTotalMemorySize()`.

Specification
-------------

Update  `com.sun.management.OperatingSystemMXBean` class as below:

    @@ -110,11 +110,11 @@
        /**
         * Returns the total amount of physical memory in bytes.
         *
    -    * @deprecated Use {@link #getMemorySize()} instead of
    +    * @deprecated Use {@link #getTotalMemorySize()} instead of
         * this historically named method.
         *
         * @implSpec This implementation must return the same value
    -    * as {@link #getMemorySize()}.
    +    * as {@link #getTotalMemorySize()}.
         *
         * @return the total amount of physical memory in  bytes.
         */
Comments
Moving to Approved. (For somewhat involved reasons, the doclint checks don't examined link correctness so this kind of change can slip through :-(
09-04-2020

Is the Scope really "SE"? com.sun.management.OperatingSystemMXBean is not expected to be part of the standard JavaSE API ... yes, it belongs to "jdk.management" module. The Scope looks deserving to be "JDK"
09-04-2020

I can't believe this error slipped in via JDK-8226575 when so many people were looking at it. :(
09-04-2020