From 75c23ddb00ec71719f25787dd22234e7e7f9a03b Mon Sep 17 00:00:00 2001 From: Philip Jagielski Date: Tue, 19 Apr 2016 17:48:03 -0500 Subject: [PATCH] Fix CertificatePinner javadoc to use a Builder The provided example wouldn't compile because OkHttpClient doesn't have a `setCertificatePinner()` method. --- okhttp/src/main/java/okhttp3/CertificatePinner.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) 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)