diff --git a/okhttp/src/main/java/okhttp3/CertificatePinner.java b/okhttp/src/main/java/okhttp3/CertificatePinner.java index 626b91e774c2..2d9022492269 100644 --- a/okhttp/src/main/java/okhttp3/CertificatePinner.java +++ b/okhttp/src/main/java/okhttp3/CertificatePinner.java @@ -50,8 +50,9 @@ * CertificatePinner certificatePinner = new CertificatePinner.Builder() * .add(hostname, "sha256/AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=") * .build(); - * OkHttpClient client = new OkHttpClient(); - * client.setCertificatePinner(certificatePinner); + * OkHttpClient client = OkHttpClient.Builder() + * .certificatePinner(certificatePinner) + * .build(); * * Request request = new Request.Builder() * .url("https://" + hostname)