Replace the use of reflection with a direct method call to a platform-specific implementation class where `SystemMetrics::instance` returns `CgroupMetrics.getInstance()` on linux and returns null on other platforms.
------------- Commit messages: - fix whitespace - JDK-8266391: Replace use of reflection in jdk.internal.platform.Metrics Changes: https://git.openjdk.java.net/jdk/pull/3828/files Webrev: https://webrevs.openjdk.java.net/?repo=jdk&pr=3828&range=00 Issue: https://bugs.openjdk.java.net/browse/JDK-8266391 Stats: 103 lines in 4 files changed: 93 ins; 8 del; 2 mod Patch: https://git.openjdk.java.net/jdk/pull/3828.diff Fetch: git fetch https://git.openjdk.java.net/jdk pull/3828/head:pull/3828 PR: https://git.openjdk.java.net/jdk/pull/3828