Skip to content

Commit

Permalink
Drop unneeded curlies from connection factory example
Browse files Browse the repository at this point in the history
  • Loading branch information
kevinsawicki committed Jun 22, 2013
1 parent 4667aed commit 4cf5418
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -193,16 +193,14 @@ Read [here](https://gist.github.com/JakeWharton/5797571).
HttpRequest.setConnectionFactory(new ConnectionFactory() {

public HttpURLConnection create(URL url) throws IOException {
if (!"https".equals(url.getProtocol())) {
if (!"https".equals(url.getProtocol()))
throw new IOException("Only secure requests are allowed");
}
return (HttpURLConnection) url.openConnection();
}

public HttpURLConnection create(URL url, Proxy proxy) throws IOException {
if (!"https".equals(url.getProtocol())) {
if (!"https".equals(url.getProtocol()))
throw new IOException("Only secure requests are allowed");
}
return (HttpURLConnection) url.openConnection(proxy);
}
});
Expand Down

0 comments on commit 4cf5418

Please sign in to comment.