On Thu, 4 May 2023 12:36:32 GMT, Jaikiran Pai <j...@openjdk.org> wrote:
>> Roger Riggs has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Source code cleanup suggested by reviewers > > src/jdk.jlink/share/classes/jdk/tools/jlink/internal/Platform.java line 71: > >> 69: */ >> 70: public static Platform runtime() { >> 71: return new Platform(OperatingSystem.current(), >> Architecture.current()); > > Should we create a single `private static final Platform`, in this class, to > represent the current platform, and keep returning it instead of creating a > new instance on each call? The method is only called once and the object created is lightweight, it doesn't add much to retain a copy. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/13585#discussion_r1186144818