The com.sun.management.OperatingSystemMXBean.getTotalPhysicalMemorySize() method description says the following:
/**
* Returns the total amount of physical memory in bytes.
*
* @deprecated Use {@link #getMemorySize()} instead of
* this historically named method.
*
* @implSpec This implementation must return the same value
* as {@link #getMemorySize()}.
*
* @return the total amount of physical memory in bytes.
**/
However, there is no such method getMemorySize(). The proper method name is getTotalMemorySize(). The method description needs to be changed to correct this.