RFR: 8374216: Assorted changes to jpackage without functional impact [v2]

Alexander Matveev almatvee at openjdk.org
Tue Dec 23 00:01:58 UTC 2025


On Mon, 22 Dec 2025 22:15:13 GMT, Alexey Semenyuk <asemenyuk at openjdk.org> wrote:

>> Miscellaneous refactorings without functional changes:
>> 
>> - Replace StringBuffer with StringBuilder where appropriate
>> - LauncherBuilder: set reasonable defaults to "defaultIconResourceName" property; move `defaultIconResourceName()` from LauncherFromOptions
>> - Make `MacHelper.createRuntimeBundle()` use PackageTest to create a runtime bundle. Will use DMG by default and optionally PKG packaging to create a runtime bundle
>> - Remove redundat parameter from `SetBuilder.build()`
>> - Make `JUnitUtils.assertArrayEquals()` permit null-s
>> - Add `JPackageCommand.withToolProvider()`
>> - Make some handy package-private methods in StandardBundlingOperation class public
>> - BundleSpec: add "sealed" modifier
>> - IdentityWrapper: add `wrapIdentity()`
>> - Simplify `DefaultBundlingEnvironment.createNativePackage()`
>> - TKit: remove "throws IOException" from `createDirectories()`; Replace `TKit.createDirectories()` with `Files.createDirectories()` where directory clean-up is not used
>
> Alexey Semenyuk has refreshed the contents of this pull request, and previous commits have been removed. Incremental views are not available.

Looks good with minor comments.

src/jdk.jpackage/share/classes/jdk/jpackage/internal/cli/StandardBundlingOperation.java line 71:

> 69:         }
> 70: 
> 71:         public boolean createBundle() {

`createBundle` -> `isCreateBundleVerb`. `createBundle` is confusing. It reads like it should create bundle when this function is called.

src/jdk.jpackage/windows/classes/jdk/jpackage/internal/WinBundlingEnvironment.java line 49:

> 47: 
> 48:         createNativePackage(options,
> 49:                 WinFromOpions.createWinMsiPackage(options),

`WinFromOpions` -> `WinFromOptions`. Missing `t`.

test/jdk/tools/jpackage/helpers/jdk/jpackage/test/MacHelper.java line 463:

> 461:         return useKeychain(keychain.spec().keychain());
> 462:     }
> 463: 

`unpackadeRuntimeBundleDir` -> `unpackedRuntimeBundleDir`

-------------

PR Review: https://git.openjdk.org/jdk/pull/28957#pullrequestreview-3606075853
PR Review Comment: https://git.openjdk.org/jdk/pull/28957#discussion_r2641516837
PR Review Comment: https://git.openjdk.org/jdk/pull/28957#discussion_r2641524848
PR Review Comment: https://git.openjdk.org/jdk/pull/28957#discussion_r2641532148


More information about the core-libs-dev mailing list