Replace SSLSession.getPeerCertificateChain() method

MSAL

The javax.net.ssl.SSLSession.getPeerCertificateChain() method implementation was removed from the SunJSSE provider and HTTP client implementation in Java SE 15. The default implementation will now throw an UnsupportedOperationException. Applications using this method should be updated to use the javax.net.ssl.SSLSession.getPeerCertificates() method instead.

org.openrewrite.java.migrate.RemovedSSLSessionGetPeerCertificateChainMethodImpl
mod run . --recipe=org.openrewrite.java.migrate.RemovedSSLSessionGetPeerCertificateChainMethodImpl

Install it once from Recipe actions, then run it on every repository under the current directory. New to the Moderne CLI? Set it up.

Recipe list

It runs these recipes, in this order.

  1. Change method name javax.net.ssl.SSLSession getPeerCertificateChain() to getPeerCertificates