RFR: 8326568: jdk/test/com/sun/net/httpserver/bugs/B6431193.java should use try-with-resource and try-finally
Darragh Clarke
dclarke at openjdk.org
Wed Mar 27 15:02:29 UTC 2024
Currently this test occasionally doesn't cleanup between runs, sometimes not stopping the server or leaving Streams open
Changes:
- Use try-with-resources to ensure streams close.
- Use try-finally to make sure the server stops before the test exits.
I ran tiers 1-3 and ran this specific test on repeat and everything seems stable after the changes
-------------
Commit messages:
- use try-finally and try-with-resources as well as slight cleanup
Changes: https://git.openjdk.org/jdk/pull/18514/files
Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=18514&range=00
Issue: https://bugs.openjdk.org/browse/JDK-8326568
Stats: 34 lines in 1 file changed: 3 ins; 10 del; 21 mod
Patch: https://git.openjdk.org/jdk/pull/18514.diff
Fetch: git fetch https://git.openjdk.org/jdk.git pull/18514/head:pull/18514
PR: https://git.openjdk.org/jdk/pull/18514
More information about the net-dev
mailing list