According to RFC 7301, the client sends the server a list of available application protocols and the server -- using a list of prioritized protocols -- chooses which protocol to use and sends it back to the client.
The logic in expectedNegoAppProtocol prioritizes the client protocol first. This PR updates the method to choose the first server-supported protocol that the client also supports. ------------- Commit messages: - 8381176: Utilities.expectedNegoAppProtocol chooses client ALPN protocol over server's Changes: https://git.openjdk.org/jdk/pull/30587/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=30587&range=00 Issue: https://bugs.openjdk.org/browse/JDK-8381176 Stats: 4 lines in 1 file changed: 0 ins; 0 del; 4 mod Patch: https://git.openjdk.org/jdk/pull/30587.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/30587/head:pull/30587 PR: https://git.openjdk.org/jdk/pull/30587
