Integrated: 8368030: Make package bundlers stateless
Alexey Semenyuk
asemenyuk at openjdk.org
Fri Sep 26 00:13:25 UTC 2025
On Thu, 18 Sep 2025 22:25:02 GMT, Alexey Semenyuk <asemenyuk at openjdk.org> wrote:
> Introduce `jdk.jpackage.internal.SystemEnvironment` interface to describe system tools needed for building specific package bundles with three immediate subinterfaces: `WinSystemEnvironment`, `LinuxSystemEnvironment`, and `MacDmgSystemEnvironment`.
>
> `LinuxSystemEnvironment` has two subinterfaces: `LinuxDebSystemEnvironment` and `LinuxRpmSystemEnvironment`.
>
> There is no `MacSystemEnvironment` interface as pkg and dmg bundlers are unrelated, unlike rpm and deb bundlers, which share a fair amount of code.
>
> There is no `MacPkgSystemEnvironment` interface because the pkg bundler doesn't validate tools.
>
> Instances of these interfaces are created as member fields of the corresponding bundler classes, i.e., bundling system tools are validated only once when a specific bundler is instantiated.
>
> Move the bundling code away from *Bundler classes into *Packager classes and completely isolate it from the "params". This is a follow-up for the effort to isolate the "params" in [JDK-8333664](https://bugs.openjdk.org/browse/JDK-8333664).
This pull request has now been integrated.
Changeset: ca03080c
Author: Alexey Semenyuk <asemenyuk at openjdk.org>
URL: https://git.openjdk.org/jdk/commit/ca03080c9f3857e88f71a5803f55877edbc7da18
Stats: 3887 lines in 33 files changed: 2331 ins; 1415 del; 141 mod
8368030: Make package bundlers stateless
Reviewed-by: almatvee
-------------
PR: https://git.openjdk.org/jdk/pull/27377
More information about the core-libs-dev
mailing list