<html><body style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class=""><br class=""><blockquote type="cite" class="">On 31 Oct 2018, at 20:03, Xuelei Fan <<a href="mailto:xuelei.fan@oracle.com" class="">xuelei.fan@oracle.com</a>> wrote:<br class=""><blockquote type="cite" style="font-family: Helvetica; font-size: 14px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; text-decoration: none;" class="">...<br class=""></blockquote>Yes.  I had the same concern about the optional operation.  However, I came to a different conclusion if I'm from viewpoint of these users that need to use this new operation.<br class=""><br class="">If an application have to use this new operation, for example to access the negotiated TLS version, this operation is essential to it. Unfortunately, because of compatibility impact, we cannot force all implementation supports this new added operation.  It is a potential problem to those applications that need it.<br class=""><br class="">It would be nice if an implementation can support this operation as soon as possible.  If we just add the operation, providers may not aware there is a need to update their implementation.  Unfortunately. there is not much we can do to notify the provider.<br class=""><br class="">If we deprecated the duplicated methods, it is easier for providers to catch up with this new added operation, and move forward to support it. As the deprecating will show up building warnings, or even error if run in strict building mode.<br class=""></blockquote><br class="">I have no issue with the addition of the new method to access the<br class="">SSLSession. Unfortunately, due to the evolutionary constraints of this<br class="">API, the `getSSLSession` method will likely need to be specified to<br class="">throw UOE. The actual JDK's HTTPS protocol handler implementation will<br class="">not throw UOE.<br class=""><br class="">Clearly there is a desire for non-JDK HTTPS protocol handler<br class="">implementations to quickly determine the need to update their code and<br class="">override the default implementation of `getSSLSession` ( to do something<br class="">useful ), hence the request to deprecate the the existing individual<br class="">security parameter accessor methods.<br class=""><br class="">I don't believe that deprecating these individual security parameter<br class="">accessors is a good idea for the following reasons:<br class=""><br class="">1) Deprecated warnings are only issued at compile-time, so only HTTPS<br class="">   protocol handler implementations being recompiled may encounter the<br class="">   warnings. Existing binary artifacts will not.<br class=""><br class="">2) More importantly. Forever more, developers wanting access to say,<br class="">   the peer principle or the server's certificate chain, will be<br class="">   encouraged to get them through an optional API ( rather than a<br class="">   non-optional API ). This increases the risk that the code will<br class="">   encounter an UOE. I don't think that this increased risk is justified<br class="">   by the desire to not-have-two-ways-to-do-the-same-thing. I would<br class="">   agree if this were a new API, but it is not.<br class=""><br class="">HTTPS protocol handler implementations actively being maintained will<br class="">likely quickly get requests from their users to provide a better<br class="">implementation of this new method, as folk move towards TLS 1.3, etc.<br class="">Maybe such requests will be sufficient to help adoption, at which point<br class="">the deprecation of these methods could then be re-considered.<br class=""><br class="">-Chris.<br class=""><br class=""><br class=""></body></html>