Skip to content

Commit

Permalink
Merge pull request #1002 from watson-developer-cloud/ssl-disable-fix
Browse files Browse the repository at this point in the history
Ensure HTTP client modification happens on the first call
  • Loading branch information
lpatino10 authored Nov 7, 2018
2 parents ec3abee + 3d6e6a7 commit 8daa212
Show file tree
Hide file tree
Showing 15 changed files with 42 additions and 41 deletions.
2 changes: 1 addition & 1 deletion .bumpversion.cfg
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[bumpversion]
current_version = 6.9.0
current_version = 6.9.1
commit = True
message = docs: Update version numbers from {current_version} -> {new_version}

Expand Down
14 changes: 7 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ All the services:
<dependency>
<groupId>com.ibm.watson.developer_cloud</groupId>
<artifactId>java-sdk</artifactId>
<version>6.9.0</version>
<version>6.9.1</version>
</dependency>
```

Expand All @@ -70,7 +70,7 @@ Only Discovery:
<dependency>
<groupId>com.ibm.watson.developer_cloud</groupId>
<artifactId>discovery</artifactId>
<version>6.9.0</version>
<version>6.9.1</version>
</dependency>
```

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

```gradle
'com.ibm.watson.developer_cloud:java-sdk:6.9.0'
'com.ibm.watson.developer_cloud:java-sdk:6.9.1'
```

Only Assistant:

```gradle
'com.ibm.watson.developer_cloud:assistant:6.9.0'
'com.ibm.watson.developer_cloud:assistant:6.9.1'
```

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

```gradle
'com.ibm.watson.developer_cloud:speech-to-text:6.9.1-SNAPSHOT'
'com.ibm.watson.developer_cloud:speech-to-text:6.9.2-SNAPSHOT'
```

##### JAR
Expand Down Expand Up @@ -347,7 +347,7 @@ Gradle:

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


[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
[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
4 changes: 2 additions & 2 deletions assistant/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,13 @@ This service is currently in **private beta** and requires access to use. To lea
<dependency>
<groupId>com.ibm.watson.developer_cloud</groupId>
<artifactId>assistant</artifactId>
<version>6.9.0</version>
<version>6.9.1</version>
</dependency>
```

##### Gradle
```gradle
'com.ibm.watson.developer_cloud:assistant:6.9.0'
'com.ibm.watson.developer_cloud:assistant:6.9.1'
```

## Usage
Expand Down
4 changes: 2 additions & 2 deletions conversation/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,13 @@ Conversation will be removed in the next major release. Please migrate to Assist
<dependency>
<groupId>com.ibm.watson.developer_cloud</groupId>
<artifactId>conversation</artifactId>
<version>6.9.0</version>
<version>6.9.1</version>
</dependency>
```

##### Gradle
```gradle
'com.ibm.watson.developer_cloud:conversation:6.9.0'
'com.ibm.watson.developer_cloud:conversation:6.9.1'
```

## Usage
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -226,17 +226,18 @@ public OkHttpClient createHttpClient() {
* Configures the current {@link OkHttpClient} instance based on the passed-in options.
*
* @param options the {@link HttpConfigOptions} object for modifying the client
* @return the client
*/
public void configureClient(HttpConfigOptions options) {
if (options == null) {
return;
public OkHttpClient configureClient(HttpConfigOptions options) {
if (options != null) {
if (options.shouldDisableSslVerification()) {
disableSslVerification();
}
if (options.getProxy() != null) {
setProxy(options.getProxy());
}
}

if (options.shouldDisableSslVerification()) {
disableSslVerification();
}
if (options.getProxy() != null) {
setProxy(options.getProxy());
}
return okHttpClient;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -167,12 +167,12 @@ protected OkHttpClient configureHttpClient() {
}

/**
* Configures the inner HTML client based on the passed-in options.
* Configures the {@link OkHttpClient} based on the passed-in options.
*
* @param options the {@link HttpConfigOptions} object for modifying the client
*/
public void configureClient(HttpConfigOptions options) {
HttpClientSingleton.getInstance().configureClient(options);
client = HttpClientSingleton.getInstance().configureClient(options);
}

/**
Expand Down
4 changes: 2 additions & 2 deletions discovery/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,13 @@
<dependency>
<groupId>com.ibm.watson.developer_cloud</groupId>
<artifactId>discovery</artifactId>
<version>6.9.0</version>
<version>6.9.1</version>
</dependency>
```

##### Gradle
```gradle
'com.ibm.watson.developer_cloud:discovery:6.9.0'
'com.ibm.watson.developer_cloud:discovery:6.9.1'
```

## Usage
Expand Down
4 changes: 2 additions & 2 deletions language-translator/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,13 @@ Language Translator v3 is now available. The v2 Language Translator API will no
<dependency>
<groupId>com.ibm.watson.developer_cloud</groupId>
<artifactId>language-translator</artifactId>
<version>6.9.0</version>
<version>6.9.1</version>
</dependency>
```

##### Gradle
```gradle
'com.ibm.watson.developer_cloud:language-translator:6.9.0'
'com.ibm.watson.developer_cloud:language-translator:6.9.1'
```

## Usage
Expand Down
4 changes: 2 additions & 2 deletions natural-language-classifier/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,13 @@
<dependency>
<groupId>com.ibm.watson.developer_cloud</groupId>
<artifactId>natural-language-classifier</artifactId>
<version>6.9.0</version>
<version>6.9.1</version>
</dependency>
```

##### Gradle
```gradle
'com.ibm.watson.developer_cloud:natural-language-classifier:6.9.0'
'com.ibm.watson.developer_cloud:natural-language-classifier:6.9.1'
```

## Usage
Expand Down
4 changes: 2 additions & 2 deletions natural-language-understanding/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,13 @@
<dependency>
<groupId>com.ibm.watson.developer_cloud</groupId>
<artifactId>natural-language-understanding</artifactId>
<version>6.9.0</version>
<version>6.9.1</version>
</dependency>
```

##### Gradle
```gradle
'com.ibm.watson.developer_cloud:natural-language-understanding:6.9.0'
'com.ibm.watson.developer_cloud:natural-language-understanding:6.9.1'
```

## Usage
Expand Down
4 changes: 2 additions & 2 deletions personality-insights/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,13 @@
<dependency>
<groupId>com.ibm.watson.developer_cloud</groupId>
<artifactId>personality-insights</artifactId>
<version>6.9.0</version>
<version>6.9.1</version>
</dependency>
```

##### Gradle
```gradle
'com.ibm.watson.developer_cloud:personality-insights:6.9.0'
'com.ibm.watson.developer_cloud:personality-insights:6.9.1'
```

## Usage
Expand Down
4 changes: 2 additions & 2 deletions speech-to-text/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,13 @@
<dependency>
<groupId>com.ibm.watson.developer_cloud</groupId>
<artifactId>speech-to-text</artifactId>
<version>6.9.0</version>
<version>6.9.1</version>
</dependency>
```

##### Gradle
```gradle
'com.ibm.watson.developer_cloud:speech-to-text:6.9.0'
'com.ibm.watson.developer_cloud:speech-to-text:6.9.1'
```

## Usage
Expand Down
4 changes: 2 additions & 2 deletions text-to-speech/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,13 @@
<dependency>
<groupId>com.ibm.watson.developer_cloud</groupId>
<artifactId>text-to-speech</artifactId>
<version>6.9.0</version>
<version>6.9.1</version>
</dependency>
```

##### Gradle
```gradle
'com.ibm.watson.developer_cloud:text-to-speech:6.9.0'
'com.ibm.watson.developer_cloud:text-to-speech:6.9.1'
```

## Usage
Expand Down
4 changes: 2 additions & 2 deletions tone-analyzer/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,13 @@
<dependency>
<groupId>com.ibm.watson.developer_cloud</groupId>
<artifactId>tone-analyzer</artifactId>
<version>6.9.0</version>
<version>6.9.1</version>
</dependency>
```

##### Gradle
```gradle
'com.ibm.watson.developer_cloud:tone-analyzer:6.9.0'
'com.ibm.watson.developer_cloud:tone-analyzer:6.9.1'
```

## Usage
Expand Down
4 changes: 2 additions & 2 deletions visual-recognition/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,13 @@
<dependency>
<groupId>com.ibm.watson.developer_cloud</groupId>
<artifactId>visual-recognition</artifactId>
<version>6.9.0</version>
<version>6.9.1</version>
</dependency>
```

##### Gradle
```gradle
'com.ibm.watson.developer_cloud:visual-recognition:6.9.0'
'com.ibm.watson.developer_cloud:visual-recognition:6.9.1'
```

## Usage
Expand Down

0 comments on commit 8daa212

Please sign in to comment.