SunJSSE implementation of `SSLEngine` throws an IllegalStateException if being 
used to start a handshake or wrap/unwrap bytes before calling 
`setUseClientMode()`. Research shows that it's not necessarily needed and the 
`server` default can be used. We do recommend users to set the desired mode 
explicitly in `SSLContext` and `SSLContextSpi` javadocs.

---------
- [x] I confirm that I make this contribution in accordance with the [OpenJDK 
Interim AI Policy](https://openjdk.org/legal/ai).

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

Commit messages:
 - Keep the throws clauses in case third party providers need them
 - Remove more "@throws IllegalStateException" tags from javadoc
 - 8386159: Don't enforce setUseClientMode for SunJSSE implementation of 
SSLEngine

Changes: https://git.openjdk.org/jdk/pull/31422/files
  Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=31422&range=00
  Issue: https://bugs.openjdk.org/browse/JDK-8386159
  Stats: 74 lines in 3 files changed: 5 ins; 49 del; 20 mod
  Patch: https://git.openjdk.org/jdk/pull/31422.diff
  Fetch: git fetch https://git.openjdk.org/jdk.git pull/31422/head:pull/31422

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

Reply via email to