- Move code shared between jpackage's Executor and jpackage's test lib Executor into `jdk.jpackage.internal.util.CommandOutputControl` class using the latter one as the baseline for the new class; [CommandOutputControl class javadoc](https://alexeysemenyukoracle.github.io/jpackage-javadoc/jdk.jpackage/jdk/jpackage/internal/util/CommandOutputControl.html). - Place "execute with retries" logic into `jdk.jpackage.internal.util.RetryExecutor` class and use it from both jpackage and jpackage's test lib. Use `jdk.jpackage.internal.RetryExecutor` class as the baseline. - Add `ObjectFactory`, `ExecutorFactory`, and `RetryExecutorFactory` interfaces to the "jdk.jpackage.internal" package. They enable the use of command mocks with jpackage. - Add `jdk.jpackage.test.mock` package. It facilitates creating command mocks. Use it to test LibProvidersLookup, LinuxSystemEnvironment, LinuxPackageArch, MacDmgSystemEnvironment, and MacDmgPackager classes.
Supplementary changes: - Make `jdk.jpackage.internal.SystemEnvironment` and all implementing classes package private ------------- Commit messages: - Copyright year update - IOUtils: remove getPID() - CommandOutputControl: processNotifier() -> processListener() - Executor-s: add missing functions - Make SystemEnvironment and related classes package-private - Rework the fix using ScopedValue - CommandOutputControlTest: test charset; add a stress test - CommandOutputControl: fix javadoc - CommandOutputControl: remove dead code based on code coverage - CommandOutputControlTest: disable test_close_streams() on macOS - ... and 41 more: https://git.openjdk.org/jdk/compare/2daf12ed...70d7de8d Changes: https://git.openjdk.org/jdk/pull/28733/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=28733&range=00 Issue: https://bugs.openjdk.org/browse/JDK-8374219 Stats: 10507 lines in 87 files changed: 8461 ins; 1644 del; 402 mod Patch: https://git.openjdk.org/jdk/pull/28733.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/28733/head:pull/28733 PR: https://git.openjdk.org/jdk/pull/28733
