> 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).

Lee Jiwon has updated the pull request incrementally with one additional commit 
since the last revision:

  Remove redundant IP_TOS test from SupportedOptions

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

Changes:
  - all: https://git.openjdk.org/jdk/pull/32943/files
  - new: https://git.openjdk.org/jdk/pull/32943/files/f63dbc17..183971f4

Webrevs:
 - full: https://webrevs.openjdk.org/?repo=jdk&pr=32943&range=03
 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=32943&range=02-03

  Stats: 12 lines in 1 file changed: 0 ins; 12 del; 0 mod
  Patch: https://git.openjdk.org/jdk/pull/32943.diff
  Fetch: git fetch https://git.openjdk.org/jdk.git pull/32943/head:pull/32943

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

Reply via email to