On Fri, 18 Sep 2026 08:01:30 GMT, Lee Jiwon <[email protected]> wrote:
> Before this change, Sockets.supportedOptions(Class<?>) used a hard-coded > option map created during class initialization. The reported set could differ > from the options supported by an actual socket instance. > > This change creates an instance of the requested socket type for each call > and returns its supportedOptions() result. The temporary socket is closed > after use, and jdk.net.Sockets does not cache the result. The hard-coded > option map and helper code used only to build that map are removed. > > Testing: > > * make test TEST=test/jdk/jdk/net/Sockets/SupportedOptions.java > * make test TEST=test/jdk/jdk/net/Sockets > * make test TEST=jdk_net — 1,082 tests passed > > --------- > - [x] I confirm that I make this contribution in accordance with the [OpenJDK > Interim AI Policy](https://openjdk.org/legal/ai). This pull request has now been integrated. Changeset: f2e6b195 Author: Lee Jiwon <[email protected]> Committer: Michael McMahon <[email protected]> URL: https://git.openjdk.org/jdk/commit/f2e6b1954ab7a51267115ce82b2b7679688095f8 Stats: 186 lines in 2 files changed: 18 ins; 133 del; 35 mod 8392528: jdk.net.Sockets.supportedOptions may differ from the supported options reported by socket instances Reviewed-by: alanb, michaelm ------------- PR: https://git.openjdk.org/jdk/pull/32943
