{"action":"created","comment":{"url":"https://api.github.com/repos/square/okhttp/pulls/comments/24222608","id":24222608,"diff_hunk":"@@ -219,7 +219,7 @@ private ConnectionSpec supportedSpec(SSLSocket sslSocket) {\n     private String[] tlsVersions;\n     private boolean supportsTlsExtensions;\n \n-    Builder(boolean tls) {\n+    public Builder(boolean tls) {","path":"okhttp/src/main/java/com/squareup/okhttp/ConnectionSpec.java","position":5,"original_position":5,"commit_id":"0d88a0f1083d7f9a2d6fa33dde8ff880b20de052","original_commit_id":"22fef3b43c71470db621e9a98928a67bdb6996bc","user":{"login":"swankjesse","id":133019,"avatar_url":"https://avatars.githubusercontent.com/u/133019?v=3","gravatar_id":"","url":"https://api.github.com/users/swankjesse","html_url":"https://github.com/swankjesse","followers_url":"https://api.github.com/users/swankjesse/followers","following_url":"https://api.github.com/users/swankjesse/following{/other_user}","gists_url":"https://api.github.com/users/swankjesse/gists{/gist_id}","starred_url":"https://api.github.com/users/swankjesse/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/swankjesse/subscriptions","organizations_url":"https://api.github.com/users/swankjesse/orgs","repos_url":"https://api.github.com/users/swankjesse/repos","events_url":"https://api.github.com/users/swankjesse/events{/privacy}","received_events_url":"https://api.github.com/users/swankjesse/received_events","type":"User","site_admin":false},"body":"I'm quite reluctant to offer a naked ConnectionSpec. In the future we may add more stuff to ConnectionSpec: for example, four years ago we didn't have NPN, SNI, or SCSV. The defaults for these things will be different depending on whether you're going for maximum security (`MODERN_TLS`) or maximum compatibility (`COMPATIBLE_TLS`).\r\n\r\nIf we add an open ended default constructor, we're in trouble because we prevent the caller from choosing whether they prefer security or compatibility.\r\n\r\nThe current design is surprising because it makes you choose. That's deliberate!","created_at":"2015-02-06T04:52:25Z","updated_at":"2015-02-06T04:52:25Z","html_url":"https://github.com/square/okhttp/pull/1364#discussion_r24222608","pull_request_url":"https://api.github.com/repos/square/okhttp/pulls/1364","_links":{"self":{"href":"https://api.github.com/repos/square/okhttp/pulls/comments/24222608"},"html":{"href":"https://github.com/square/okhttp/pull/1364#discussion_r24222608"},"pull_request":{"href":"https://api.github.com/repos/square/okhttp/pulls/1364"}}},"pull_request":{"url":"https://api.github.com/repos/square/okhttp/pulls/1364","id":28772797,"html_url":"https://github.com/square/okhttp/pull/1364","diff_url":"https://github.com/square/okhttp/pull/1364.diff","patch_url":"https://github.com/square/okhttp/pull/1364.patch","issue_url":"https://api.github.com/repos/square/okhttp/issues/1364","number":1364,"state":"open","locked":false,"title":"ConnectionSpec: Allow custom specifications","user":{"login":"raggi","id":348,"avatar_url":"https://avatars.githubusercontent.com/u/348?v=3","gravatar_id":"","url":"https://api.github.com/users/raggi","html_url":"https://github.com/raggi","followers_url":"https://api.github.com/users/raggi/followers","following_url":"https://api.github.com/users/raggi/following{/other_user}","gists_url":"https://api.github.com/users/raggi/gists{/gist_id}","starred_url":"https://api.github.com/users/raggi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/raggi/subscriptions","organizations_url":"https://api.github.com/users/raggi/orgs","repos_url":"https://api.github.com/users/raggi/repos","events_url":"https://api.github.com/users/raggi/events{/privacy}","received_events_url":"https://api.github.com/users/raggi/received_events","type":"User","site_admin":false},"body":"I would like to be able to create ConnectionSpec's, like so:\r\n\r\n``` java\r\nConnectionSpec mySpec = new ConnectionSpec.Builder(true)\r\n    .cipherSuites( ... strings or enums ... ).build();\r\n```\r\n\r\nThis patch enables two things :cake: :\r\n * Creation of `ConnectionSpec.Builder` objects rather than having to derive them from one of the predefined constants (previously Builder(boolean) was package-private).\r\n * Users can use the String... API to set CiperSuites and TLS versions, enabling forward-compatibility. You may wish to encourage users to continue to use the enums, but we already have a use case where the enum is insufficient.\r\n\r\nThank you in advance for your review, and thank you for the library!","created_at":"2015-02-05T23:42:26Z","updated_at":"2015-02-06T04:52:25Z","closed_at":null,"merged_at":null,"merge_commit_sha":"c83318ad9a95398b5021573421f03fc64ee80fe0","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/square/okhttp/pulls/1364/commits","review_comments_url":"https://api.github.com/repos/square/okhttp/pulls/1364/comments","review_comment_url":"https://api.github.com/repos/square/okhttp/pulls/comments/{number}","comments_url":"https://api.github.com/repos/square/okhttp/issues/1364/comments","statuses_url":"https://api.github.com/repos/square/okhttp/statuses/0d88a0f1083d7f9a2d6fa33dde8ff880b20de052","head":{"label":"raggi:support-custom-connectionspecs","ref":"support-custom-connectionspecs","sha":"0d88a0f1083d7f9a2d6fa33dde8ff880b20de052","user":{"login":"raggi","id":348,"avatar_url":"https://avatars.githubusercontent.com/u/348?v=3","gravatar_id":"","url":"https://api.github.com/users/raggi","html_url":"https://github.com/raggi","followers_url":"https://api.github.com/users/raggi/followers","following_url":"https://api.github.com/users/raggi/following{/other_user}","gists_url":"https://api.github.com/users/raggi/gists{/gist_id}","starred_url":"https://api.github.com/users/raggi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/raggi/subscriptions","organizations_url":"https://api.github.com/users/raggi/orgs","repos_url":"https://api.github.com/users/raggi/repos","events_url":"https://api.github.com/users/raggi/events{/privacy}","received_events_url":"https://api.github.com/users/raggi/received_events","type":"User","site_admin":false},"repo":{"id":30380754,"name":"okhttp","full_name":"raggi/okhttp","owner":{"login":"raggi","id":348,"avatar_url":"https://avatars.githubusercontent.com/u/348?v=3","gravatar_id":"","url":"https://api.github.com/users/raggi","html_url":"https://github.com/raggi","followers_url":"https://api.github.com/users/raggi/followers","following_url":"https://api.github.com/users/raggi/following{/other_user}","gists_url":"https://api.github.com/users/raggi/gists{/gist_id}","starred_url":"https://api.github.com/users/raggi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/raggi/subscriptions","organizations_url":"https://api.github.com/users/raggi/orgs","repos_url":"https://api.github.com/users/raggi/repos","events_url":"https://api.github.com/users/raggi/events{/privacy}","received_events_url":"https://api.github.com/users/raggi/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/raggi/okhttp","description":"An HTTP+SPDY client for Android and Java applications.","fork":true,"url":"https://api.github.com/repos/raggi/okhttp","forks_url":"https://api.github.com/repos/raggi/okhttp/forks","keys_url":"https://api.github.com/repos/raggi/okhttp/keys{/key_id}","collaborators_url":"https://api.github.com/repos/raggi/okhttp/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/raggi/okhttp/teams","hooks_url":"https://api.github.com/repos/raggi/okhttp/hooks","issue_events_url":"https://api.github.com/repos/raggi/okhttp/issues/events{/number}","events_url":"https://api.github.com/repos/raggi/okhttp/events","assignees_url":"https://api.github.com/repos/raggi/okhttp/assignees{/user}","branches_url":"https://api.github.com/repos/raggi/okhttp/branches{/branch}","tags_url":"https://api.github.com/repos/raggi/okhttp/tags","blobs_url":"https://api.github.com/repos/raggi/okhttp/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/raggi/okhttp/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/raggi/okhttp/git/refs{/sha}","trees_url":"https://api.github.com/repos/raggi/okhttp/git/trees{/sha}","statuses_url":"https://api.github.com/repos/raggi/okhttp/statuses/{sha}","languages_url":"https://api.github.com/repos/raggi/okhttp/languages","stargazers_url":"https://api.github.com/repos/raggi/okhttp/stargazers","contributors_url":"https://api.github.com/repos/raggi/okhttp/contributors","subscribers_url":"https://api.github.com/repos/raggi/okhttp/subscribers","subscription_url":"https://api.github.com/repos/raggi/okhttp/subscription","commits_url":"https://api.github.com/repos/raggi/okhttp/commits{/sha}","git_commits_url":"https://api.github.com/repos/raggi/okhttp/git/commits{/sha}","comments_url":"https://api.github.com/repos/raggi/okhttp/comments{/number}","issue_comment_url":"https://api.github.com/repos/raggi/okhttp/issues/comments/{number}","contents_url":"https://api.github.com/repos/raggi/okhttp/contents/{+path}","compare_url":"https://api.github.com/repos/raggi/okhttp/compare/{base}...{head}","merges_url":"https://api.github.com/repos/raggi/okhttp/merges","archive_url":"https://api.github.com/repos/raggi/okhttp/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/raggi/okhttp/downloads","issues_url":"https://api.github.com/repos/raggi/okhttp/issues{/number}","pulls_url":"https://api.github.com/repos/raggi/okhttp/pulls{/number}","milestones_url":"https://api.github.com/repos/raggi/okhttp/milestones{/number}","notifications_url":"https://api.github.com/repos/raggi/okhttp/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/raggi/okhttp/labels{/name}","releases_url":"https://api.github.com/repos/raggi/okhttp/releases{/id}","created_at":"2015-02-05T22:00:47Z","updated_at":"2015-02-05T22:00:49Z","pushed_at":"2015-02-06T01:11:44Z","git_url":"git://github.com/raggi/okhttp.git","ssh_url":"git@github.com:raggi/okhttp.git","clone_url":"https://github.com/raggi/okhttp.git","svn_url":"https://github.com/raggi/okhttp","homepage":"http://square.github.io/okhttp/","size":26185,"stargazers_count":0,"watchers_count":0,"language":"Java","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"square:master","ref":"master","sha":"b92c1b9db1c27b8035157a9016344db9e5f198ec","user":{"login":"square","id":82592,"avatar_url":"https://avatars.githubusercontent.com/u/82592?v=3","gravatar_id":"","url":"https://api.github.com/users/square","html_url":"https://github.com/square","followers_url":"https://api.github.com/users/square/followers","following_url":"https://api.github.com/users/square/following{/other_user}","gists_url":"https://api.github.com/users/square/gists{/gist_id}","starred_url":"https://api.github.com/users/square/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/square/subscriptions","organizations_url":"https://api.github.com/users/square/orgs","repos_url":"https://api.github.com/users/square/repos","events_url":"https://api.github.com/users/square/events{/privacy}","received_events_url":"https://api.github.com/users/square/received_events","type":"Organization","site_admin":false},"repo":{"id":5152285,"name":"okhttp","full_name":"square/okhttp","owner":{"login":"square","id":82592,"avatar_url":"https://avatars.githubusercontent.com/u/82592?v=3","gravatar_id":"","url":"https://api.github.com/users/square","html_url":"https://github.com/square","followers_url":"https://api.github.com/users/square/followers","following_url":"https://api.github.com/users/square/following{/other_user}","gists_url":"https://api.github.com/users/square/gists{/gist_id}","starred_url":"https://api.github.com/users/square/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/square/subscriptions","organizations_url":"https://api.github.com/users/square/orgs","repos_url":"https://api.github.com/users/square/repos","events_url":"https://api.github.com/users/square/events{/privacy}","received_events_url":"https://api.github.com/users/square/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/square/okhttp","description":"An HTTP+SPDY client for Android and Java applications.","fork":false,"url":"https://api.github.com/repos/square/okhttp","forks_url":"https://api.github.com/repos/square/okhttp/forks","keys_url":"https://api.github.com/repos/square/okhttp/keys{/key_id}","collaborators_url":"https://api.github.com/repos/square/okhttp/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/square/okhttp/teams","hooks_url":"https://api.github.com/repos/square/okhttp/hooks","issue_events_url":"https://api.github.com/repos/square/okhttp/issues/events{/number}","events_url":"https://api.github.com/repos/square/okhttp/events","assignees_url":"https://api.github.com/repos/square/okhttp/assignees{/user}","branches_url":"https://api.github.com/repos/square/okhttp/branches{/branch}","tags_url":"https://api.github.com/repos/square/okhttp/tags","blobs_url":"https://api.github.com/repos/square/okhttp/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/square/okhttp/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/square/okhttp/git/refs{/sha}","trees_url":"https://api.github.com/repos/square/okhttp/git/trees{/sha}","statuses_url":"https://api.github.com/repos/square/okhttp/statuses/{sha}","languages_url":"https://api.github.com/repos/square/okhttp/languages","stargazers_url":"https://api.github.com/repos/square/okhttp/stargazers","contributors_url":"https://api.github.com/repos/square/okhttp/contributors","subscribers_url":"https://api.github.com/repos/square/okhttp/subscribers","subscription_url":"https://api.github.com/repos/square/okhttp/subscription","commits_url":"https://api.github.com/repos/square/okhttp/commits{/sha}","git_commits_url":"https://api.github.com/repos/square/okhttp/git/commits{/sha}","comments_url":"https://api.github.com/repos/square/okhttp/comments{/number}","issue_comment_url":"https://api.github.com/repos/square/okhttp/issues/comments/{number}","contents_url":"https://api.github.com/repos/square/okhttp/contents/{+path}","compare_url":"https://api.github.com/repos/square/okhttp/compare/{base}...{head}","merges_url":"https://api.github.com/repos/square/okhttp/merges","archive_url":"https://api.github.com/repos/square/okhttp/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/square/okhttp/downloads","issues_url":"https://api.github.com/repos/square/okhttp/issues{/number}","pulls_url":"https://api.github.com/repos/square/okhttp/pulls{/number}","milestones_url":"https://api.github.com/repos/square/okhttp/milestones{/number}","notifications_url":"https://api.github.com/repos/square/okhttp/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/square/okhttp/labels{/name}","releases_url":"https://api.github.com/repos/square/okhttp/releases{/id}","created_at":"2012-07-23T13:42:55Z","updated_at":"2015-02-06T04:35:16Z","pushed_at":"2015-01-31T22:47:24Z","git_url":"git://github.com/square/okhttp.git","ssh_url":"git@github.com:square/okhttp.git","clone_url":"https://github.com/square/okhttp.git","svn_url":"https://github.com/square/okhttp","homepage":"http://square.github.io/okhttp/","size":26185,"stargazers_count":3337,"watchers_count":3337,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":744,"mirror_url":null,"open_issues_count":71,"forks":744,"open_issues":71,"watchers":3337,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/square/okhttp/pulls/1364"},"html":{"href":"https://github.com/square/okhttp/pull/1364"},"issue":{"href":"https://api.github.com/repos/square/okhttp/issues/1364"},"comments":{"href":"https://api.github.com/repos/square/okhttp/issues/1364/comments"},"review_comments":{"href":"https://api.github.com/repos/square/okhttp/pulls/1364/comments"},"review_comment":{"href":"https://api.github.com/repos/square/okhttp/pulls/comments/{number}"},"commits":{"href":"https://api.github.com/repos/square/okhttp/pulls/1364/commits"},"statuses":{"href":"https://api.github.com/repos/square/okhttp/statuses/0d88a0f1083d7f9a2d6fa33dde8ff880b20de052"}}}}