On Fri, 5 May 2023 14:10:42 GMT, Roger Riggs <rri...@openjdk.org> wrote:
>> 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. That sounds reasonable to me. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/13585#discussion_r1186149633