More refactoring to limit the scope of `@SuppressWarnings` annotations. Sometimes I introduce new methods. Please feel free to suggest method names you like to use.
Note: this is copied from https://github.com/openjdk/jdk17/pull/152. ------------- Commit messages: - copy all code change from jdk17 Changes: https://git.openjdk.java.net/jdk/pull/4615/files Webrev: https://webrevs.openjdk.java.net/?repo=jdk&pr=4615&range=00 Issue: https://bugs.openjdk.java.net/browse/JDK-8269409 Stats: 293 lines in 21 files changed: 165 ins; 64 del; 64 mod Patch: https://git.openjdk.java.net/jdk/pull/4615.diff Fetch: git fetch https://git.openjdk.java.net/jdk pull/4615/head:pull/4615 PR: https://git.openjdk.java.net/jdk/pull/4615