Skip to content

Commit

Permalink
Make HttpClientGitHubConnector the default connector for Java 11
Browse files Browse the repository at this point in the history
  • Loading branch information
bitwiseman committed Nov 21, 2021
1 parent 742ce54 commit 9117f9b
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -50,11 +50,11 @@ static GitHubConnector create(String defaultConnectorProperty) {
} else if (defaultConnectorProperty.equalsIgnoreCase("httpclient")) {
return new HttpClientGitHubConnector();
} else if (defaultConnectorProperty.equalsIgnoreCase("default")) {
// try {
// return new HttpClientGitHubConnector();
// } catch (UnsupportedOperationException | LinkageError e) {
return new GitHubConnectorHttpConnectorAdapter(HttpConnector.DEFAULT);
// }
try {
return new HttpClientGitHubConnector();
} catch (UnsupportedOperationException | LinkageError e) {
return new GitHubConnectorHttpConnectorAdapter(HttpConnector.DEFAULT);
}
} else {
throw new IllegalStateException(
"Property 'test.github.connector' must reference a valid built-in connector - okhttp, okhttpconnector, urlconnection, or default.");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,6 @@ public void testCreate() throws Exception {

connector = DefaultGitHubConnector.create("default");

// Current implementation never uses httpclient for default.
usingHttpClient = false;
if (usingHttpClient) {
assertThat(connector, instanceOf(HttpClientGitHubConnector.class));
} else {
Expand Down

0 comments on commit 9117f9b

Please sign in to comment.