RFR: 8325525: Create jtreg test case for JDK-8325203 [v3]
Alexey Semenyuk
asemenyuk at openjdk.org
Tue Jul 9 14:28:35 UTC 2024
On Tue, 9 Jul 2024 10:49:06 GMT, Vanitha B P <duke at openjdk.org> wrote:
>> Created jtreg test case for [JDK-8325203](https://bugs.openjdk.org/browse/JDK-8325203) issue.
>>
>> The JpackageTest created tests that the child process started from the app launched by jpackage launcher is not automatically terminated when the the launcher is terminated.
>
> Vanitha B P has updated the pull request incrementally with one additional commit since the last revision:
>
> Addressed the review comments based on the inputs
test/jdk/tools/jpackage/apps/ChildProcessAppLauncher.java line 39:
> 37: System.out.println("Calc id=" + process.pid());
> 38: System.exit(0);
> 39: }
The better alternative would be:
```String calcPath = Path.of(System.getenv("SystemRoot"), "system32", "calc.exe").toString();```
This way NPE will be thrown if `SystemRoot` env variable is not set instead of silent exit, and `FS` field is not needed.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/19536#discussion_r1670627437
More information about the core-libs-dev
mailing list