Assorted jpackage tests fixes:
 - Fix `JPackageCommand.isFakeRuntime()` on macOS: it failed to identify fully 
functional runtime, marking all runtimes "fake";
 - Add a test for the ExceptionBox class and get 100% coverage of the 
"jdk.jpackage.internal.util.function" package;
 - DottedVersionTest: add coverage for `DottedVersion.getComponentsCount()`;
 - AppVersionTest.java: add validation to the parameter of AppTestSpec  ctor;
 - JPackageCommand.java: make `DEFAULT_RUNTIME_IMAGE` field private;
 - Convert "switch" statements to expressions and drop redundant "default" 
clauses where applicable.

- [x] I confirm that I make this contribution in accordance with the [OpenJDK 
Interim AI Policy](https://openjdk.org/legal/ai).

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

Commit messages:
 - Convert "switch" statements to expressions and drop redundant "default" 
clauses where applicable
 - JPackageCommand: convert "switch" statements to expressions and drop 
redundant "default" clauses.
 - JPackageCommand: make DEFAULT_RUNTIME_IMAGE private
 - DottedVersionTest: add coverage for DottedVersion.getComponentsCount()
 - AppVersionTest: add parameter validation to AppTestSpec ctor
 - ExceptionBoxTest: add missing coverage. With this fix 
"jdk.jpackage.internal.util.function" package has 100% test coverage.
 - JPackageCommand: fix isFakeRuntime() on macOS

Changes: https://git.openjdk.org/jdk/pull/30510/files
  Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=30510&range=00
  Issue: https://bugs.openjdk.org/browse/JDK-8382684
  Stats: 181 lines in 15 files changed: 36 ins; 81 del; 64 mod
  Patch: https://git.openjdk.org/jdk/pull/30510.diff
  Fetch: git fetch https://git.openjdk.org/jdk.git pull/30510/head:pull/30510

PR: https://git.openjdk.org/jdk/pull/30510

Reply via email to