RFR: 8371092: NullPointerException in AltServiceUsageTest.afterClass() test

Peyang duke at openjdk.org
Sun Nov 2 14:16:37 UTC 2025


- Add `safeClose(DatagramChannel)` to close udpNotResponding safely.
- Null-check and exception handling unified with `safeStop()`.
- Ensures test cleanup never fails due to uninitialized or problematic channel.

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

Commit messages:
 - 8371092: Avoid NPE in SimpleHttpsServerTest afterClass

Changes: https://git.openjdk.org/jdk/pull/28104/files
  Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=28104&range=00
  Issue: https://bugs.openjdk.org/browse/JDK-8371092
  Stats: 14 lines in 1 file changed: 13 ins; 0 del; 1 mod
  Patch: https://git.openjdk.org/jdk/pull/28104.diff
  Fetch: git fetch https://git.openjdk.org/jdk.git pull/28104/head:pull/28104

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


More information about the net-dev mailing list