Some jpackage error messages have "Error: " prefix. Some don't. Remove this prefix. It is redundant as jpackage assembles the error message from the localized "Error: " prefix and localized message body [1].
There are error messages specific to jpackage options that duplicate generic error messages. They are:
ERR_BuildRootInvalid
=================
It duplicates a generic "error.parameter-not-empty-directory" error message.
Specialized error message: Error: temp (foo) must be non-existent or empty directory
Generic error message: The value "foo" provided for parameter --temp is not an empty directory or non existent path
ERR_AppImageNotExist
===================
It duplicates a generic "error.parameter-not-directory" error message.
Specialized error message: Error: App image directory "foo" does not exist
Generic error message: The value "foo" provided for parameter --app-image is not a directory
ERR_BothMainJarAndModule
=======================
It duplicates a generic "ERR_MutuallyExclusiveOptions" error message.
Specialized error message: Error: Cannot have both --main-jar and --module Options
Generic error message: Mutually exclusive options [--main-jar] and [--module]
ERR_NoAddLauncherName
=====================
It duplicates a generic "error.parameter-add-launcher-malformed" error message.
Specialized error message: Error: --add-launcher option requires a name and a file path (--add-launcher <name>=<file path>)
Generic error message: The value "foo" provided for parameter --add-launcher does not match the pattern <name>=<file path>
Specialized error messages duplicating generic error messages should be removed to simplify maintenance.
Also, ERR_MissingArgument is not referenced in the implementation, but mistakenly referenced in the tests. It should be ERR_MissingArgument2 instead, and ERR_MissingArgument can be removed.
There are error messages that are not referenced in the code. They are:
- message.creating-association-with-null-extension
- error.must-sign-app-store
- error.must-sign-app-store.advice
- resource.bundle-config-file
- message.ignoring.symlink
- message.already.signed
- message.running-script
- resource.setup-icon
- message.invalid.install.dir
- message.module-class
Unreferenced error messages should be removed.
[1] https://github.com/openjdk/jdk/blob/5f806e7f8b66c14954a07005be3bceb2f812fbff/src/jdk.jpackage/share/classes/jdk/jpackage/internal/cli/Main.java#L176
There are error messages specific to jpackage options that duplicate generic error messages. They are:
ERR_BuildRootInvalid
=================
It duplicates a generic "error.parameter-not-empty-directory" error message.
Specialized error message: Error: temp (foo) must be non-existent or empty directory
Generic error message: The value "foo" provided for parameter --temp is not an empty directory or non existent path
ERR_AppImageNotExist
===================
It duplicates a generic "error.parameter-not-directory" error message.
Specialized error message: Error: App image directory "foo" does not exist
Generic error message: The value "foo" provided for parameter --app-image is not a directory
ERR_BothMainJarAndModule
=======================
It duplicates a generic "ERR_MutuallyExclusiveOptions" error message.
Specialized error message: Error: Cannot have both --main-jar and --module Options
Generic error message: Mutually exclusive options [--main-jar] and [--module]
ERR_NoAddLauncherName
=====================
It duplicates a generic "error.parameter-add-launcher-malformed" error message.
Specialized error message: Error: --add-launcher option requires a name and a file path (--add-launcher <name>=<file path>)
Generic error message: The value "foo" provided for parameter --add-launcher does not match the pattern <name>=<file path>
Specialized error messages duplicating generic error messages should be removed to simplify maintenance.
Also, ERR_MissingArgument is not referenced in the implementation, but mistakenly referenced in the tests. It should be ERR_MissingArgument2 instead, and ERR_MissingArgument can be removed.
There are error messages that are not referenced in the code. They are:
- message.creating-association-with-null-extension
- error.must-sign-app-store
- error.must-sign-app-store.advice
- resource.bundle-config-file
- message.ignoring.symlink
- message.already.signed
- message.running-script
- resource.setup-icon
- message.invalid.install.dir
- message.module-class
Unreferenced error messages should be removed.
[1] https://github.com/openjdk/jdk/blob/5f806e7f8b66c14954a07005be3bceb2f812fbff/src/jdk.jpackage/share/classes/jdk/jpackage/internal/cli/Main.java#L176
- links to
-
Review(master)
openjdk/jdk/28457