On Tue, 10 Feb 2026 01:02:40 GMT, Alexander Matveev <[email protected]> wrote:
>> src/jdk.jpackage/macosx/classes/jdk/jpackage/internal/MacFromOptions.java >> line 367: >> >>> 365: return ver.toComponentsString(); >>> 366: } >>> 367: } >> >> Why branching? >> >> It can be as simple as: >> >> DottedVersion.lazy(version).trim(3).pad(3).toComponentsString() >> >> >> The same comment applies to other locations where `trim()` and `pad()` are >> used. > > 1, 2 and 3 components are valid for macOS. I do not see a point to normalized > valid versions. For example if we packaging JDK 27, then file name will be > myJDK-27.dmg, but if we normalize to 3 components always it will be > myJDK-27.0.0.dmg. Ok, then it should be no padding, only trimming: DottedVersion.lazy(version).trim(3).toComponentsString() ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/29260#discussion_r2785312227
