RFR: 8375183: Remove unused SSLConfiguration.maximumProtocolVersion variable
Koushik Muthukrishnan Thirupattur
duke at openjdk.org
Wed Jan 14 04:09:34 UTC 2026
On Tue, 13 Jan 2026 20:50:11 GMT, Artur Barashev <abarashev at openjdk.org> wrote:
>> Won't it require additional null checks then? Now it essentially defaults to a max protocol version, which was always present (`ProtocolVersion.NONE` by default)
>
> We don't need null checks, `protocolVersion` currently is not used before it's set to the negotiated protocol, and we'll get a NPE if somebody tries to use it before it's set. It is basically a representation of negotiated protocol in `TransportContext`.
In that case, instead of leaving it null, can we consider initializing protocolVersion to ProtocolVersion.NONE with a short comment? That would avoid using null as state and make the intent more explicit/readable.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/29192#discussion_r2688865119
More information about the security-dev
mailing list