Skip to content

Commit 8daa212

Browse files
authored
Merge pull request #1002 from watson-developer-cloud/ssl-disable-fix
Ensure HTTP client modification happens on the first call
2 parents ec3abee + 3d6e6a7 commit 8daa212

File tree

15 files changed

+42
-41
lines changed

15 files changed

+42
-41
lines changed

.bumpversion.cfg

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
[bumpversion]
2-
current_version = 6.9.0
2+
current_version = 6.9.1
33
commit = True
44
message = docs: Update version numbers from {current_version} -> {new_version}
55

README.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ All the services:
6060
<dependency>
6161
<groupId>com.ibm.watson.developer_cloud</groupId>
6262
<artifactId>java-sdk</artifactId>
63-
<version>6.9.0</version>
63+
<version>6.9.1</version>
6464
</dependency>
6565
```
6666

@@ -70,7 +70,7 @@ Only Discovery:
7070
<dependency>
7171
<groupId>com.ibm.watson.developer_cloud</groupId>
7272
<artifactId>discovery</artifactId>
73-
<version>6.9.0</version>
73+
<version>6.9.1</version>
7474
</dependency>
7575
```
7676

@@ -79,13 +79,13 @@ Only Discovery:
7979
All the services:
8080

8181
```gradle
82-
'com.ibm.watson.developer_cloud:java-sdk:6.9.0'
82+
'com.ibm.watson.developer_cloud:java-sdk:6.9.1'
8383
```
8484

8585
Only Assistant:
8686

8787
```gradle
88-
'com.ibm.watson.developer_cloud:assistant:6.9.0'
88+
'com.ibm.watson.developer_cloud:assistant:6.9.1'
8989
```
9090

9191
##### Development snapshots
@@ -108,7 +108,7 @@ And then reference the snapshot version on your app module gradle
108108
Only Speech to Text:
109109

110110
```gradle
111-
'com.ibm.watson.developer_cloud:speech-to-text:6.9.1-SNAPSHOT'
111+
'com.ibm.watson.developer_cloud:speech-to-text:6.9.2-SNAPSHOT'
112112
```
113113

114114
##### JAR
@@ -347,7 +347,7 @@ Gradle:
347347

348348
```sh
349349
cd java-sdk
350-
gradle jar # build jar file (build/libs/watson-developer-cloud-6.9.0.jar)
350+
gradle jar # build jar file (build/libs/watson-developer-cloud-6.9.1.jar)
351351
gradle test # run tests
352352
gradle check # performs quality checks on source files and generates reports
353353
gradle testReport # run tests and generate the aggregated test report (build/reports/allTests)
@@ -400,4 +400,4 @@ or [Stack Overflow](http://stackoverflow.com/questions/ask?tags=ibm-watson).
400400
[ibm-cloud-onboarding]: http://console.bluemix.net/registration?target=/developer/watson&cm_sp=WatsonPlatform-WatsonServices-_-OnPageNavLink-IBMWatson_SDKs-_-Java
401401

402402

403-
[jar]: https://github.com/watson-developer-cloud/java-sdk/releases/download/java-sdk-6.9.0/java-sdk-6.9.0-jar-with-dependencies.jar
403+
[jar]: https://github.com/watson-developer-cloud/java-sdk/releases/download/java-sdk-6.9.1/java-sdk-6.9.1-jar-with-dependencies.jar

assistant/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,13 @@ This service is currently in **private beta** and requires access to use. To lea
1010
<dependency>
1111
<groupId>com.ibm.watson.developer_cloud</groupId>
1212
<artifactId>assistant</artifactId>
13-
<version>6.9.0</version>
13+
<version>6.9.1</version>
1414
</dependency>
1515
```
1616

1717
##### Gradle
1818
```gradle
19-
'com.ibm.watson.developer_cloud:assistant:6.9.0'
19+
'com.ibm.watson.developer_cloud:assistant:6.9.1'
2020
```
2121

2222
## Usage

conversation/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,13 @@ Conversation will be removed in the next major release. Please migrate to Assist
1010
<dependency>
1111
<groupId>com.ibm.watson.developer_cloud</groupId>
1212
<artifactId>conversation</artifactId>
13-
<version>6.9.0</version>
13+
<version>6.9.1</version>
1414
</dependency>
1515
```
1616

1717
##### Gradle
1818
```gradle
19-
'com.ibm.watson.developer_cloud:conversation:6.9.0'
19+
'com.ibm.watson.developer_cloud:conversation:6.9.1'
2020
```
2121

2222
## Usage

core/src/main/java/com/ibm/watson/developer_cloud/http/HttpClientSingleton.java

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -226,17 +226,18 @@ public OkHttpClient createHttpClient() {
226226
* Configures the current {@link OkHttpClient} instance based on the passed-in options.
227227
*
228228
* @param options the {@link HttpConfigOptions} object for modifying the client
229+
* @return the client
229230
*/
230-
public void configureClient(HttpConfigOptions options) {
231-
if (options == null) {
232-
return;
231+
public OkHttpClient configureClient(HttpConfigOptions options) {
232+
if (options != null) {
233+
if (options.shouldDisableSslVerification()) {
234+
disableSslVerification();
235+
}
236+
if (options.getProxy() != null) {
237+
setProxy(options.getProxy());
238+
}
233239
}
234240

235-
if (options.shouldDisableSslVerification()) {
236-
disableSslVerification();
237-
}
238-
if (options.getProxy() != null) {
239-
setProxy(options.getProxy());
240-
}
241+
return okHttpClient;
241242
}
242243
}

core/src/main/java/com/ibm/watson/developer_cloud/service/WatsonService.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -167,12 +167,12 @@ protected OkHttpClient configureHttpClient() {
167167
}
168168

169169
/**
170-
* Configures the inner HTML client based on the passed-in options.
170+
* Configures the {@link OkHttpClient} based on the passed-in options.
171171
*
172172
* @param options the {@link HttpConfigOptions} object for modifying the client
173173
*/
174174
public void configureClient(HttpConfigOptions options) {
175-
HttpClientSingleton.getInstance().configureClient(options);
175+
client = HttpClientSingleton.getInstance().configureClient(options);
176176
}
177177

178178
/**

discovery/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,13 @@
77
<dependency>
88
<groupId>com.ibm.watson.developer_cloud</groupId>
99
<artifactId>discovery</artifactId>
10-
<version>6.9.0</version>
10+
<version>6.9.1</version>
1111
</dependency>
1212
```
1313

1414
##### Gradle
1515
```gradle
16-
'com.ibm.watson.developer_cloud:discovery:6.9.0'
16+
'com.ibm.watson.developer_cloud:discovery:6.9.1'
1717
```
1818

1919
## Usage

language-translator/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,13 @@ Language Translator v3 is now available. The v2 Language Translator API will no
1010
<dependency>
1111
<groupId>com.ibm.watson.developer_cloud</groupId>
1212
<artifactId>language-translator</artifactId>
13-
<version>6.9.0</version>
13+
<version>6.9.1</version>
1414
</dependency>
1515
```
1616

1717
##### Gradle
1818
```gradle
19-
'com.ibm.watson.developer_cloud:language-translator:6.9.0'
19+
'com.ibm.watson.developer_cloud:language-translator:6.9.1'
2020
```
2121

2222
## Usage

natural-language-classifier/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,13 @@
77
<dependency>
88
<groupId>com.ibm.watson.developer_cloud</groupId>
99
<artifactId>natural-language-classifier</artifactId>
10-
<version>6.9.0</version>
10+
<version>6.9.1</version>
1111
</dependency>
1212
```
1313

1414
##### Gradle
1515
```gradle
16-
'com.ibm.watson.developer_cloud:natural-language-classifier:6.9.0'
16+
'com.ibm.watson.developer_cloud:natural-language-classifier:6.9.1'
1717
```
1818

1919
## Usage

natural-language-understanding/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,13 @@
77
<dependency>
88
<groupId>com.ibm.watson.developer_cloud</groupId>
99
<artifactId>natural-language-understanding</artifactId>
10-
<version>6.9.0</version>
10+
<version>6.9.1</version>
1111
</dependency>
1212
```
1313

1414
##### Gradle
1515
```gradle
16-
'com.ibm.watson.developer_cloud:natural-language-understanding:6.9.0'
16+
'com.ibm.watson.developer_cloud:natural-language-understanding:6.9.1'
1717
```
1818

1919
## Usage

0 commit comments

Comments
 (0)