On Thu, 21 Aug 2025 00:17:05 GMT, Alexander Matveev <almat...@openjdk.org> 
wrote:

>> - Added following note for `--app-content` on macOS to help and man page: 
>> `The value should be a directory with the "Resources" subdirectory (or any 
>> other directory that is valid in the "Contents" directory of the application 
>> bundle). Otherwise, jpackage may produce invalid application bundle which 
>> may fail code signing and/or notarization.`
>> - Added warning if `--app-content` if it points to non-standard subdirectory 
>> in "Contents" directory.
>> - Added test to cover warning message.
>
> Alexander Matveev has updated the pull request incrementally with one 
> additional commit since the last revision:
> 
>   8356218: [macos] Document --app-content [v3]

test/jdk/tools/jpackage/helpers/jdk/jpackage/test/JPackageCommand.java line 748:

> 746:         ignoreExitCode = v;
> 747:         return this;
> 748:     }

This is bad. It makes unclear semantics of the `JPackageCommand.execute(int 
expectedExitCode)` function.

I suggest adding `JPackageCommand.executeIgnoreExitCode()` function instead in 
the following way:

public Executor.Result executeIgnoreExitCode() {
    return execute(Optional.empty());
}

public Executor.Result execute(int expectedExitCode) {
    return execute(Optional.of(expectedExitCode));
} 

private Executor.Result execute(Optional expectedExitCode) {
    // Here goes the implementation of the current execute(int 
expectedExitCode) function adjusted accordingly
}

test/jdk/tools/jpackage/share/AppContentTest.java line 122:

> 120:     @Parameter({TEST_DIR, "warning.non.standard.contents.sub.dir"})
> 121:     @Parameter({TEST_DUKE, "warning.app.content.is.not.dir"})
> 122:     public void testWarnings(String... args) throws Exception {

`String... args` -> `String testPath, String warningId`

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

PR Review Comment: https://git.openjdk.org/jdk/pull/26848#discussion_r2289575904
PR Review Comment: https://git.openjdk.org/jdk/pull/26848#discussion_r2289578904

Reply via email to