Skip to content

Commit 7100c9c

Browse files
authored
Merge pull request #78 from merative/dlangst2
fix: bump core and okhttp3 to avoid CVE
2 parents 1527078 + 4f4ad40 commit 7100c9c

File tree

3 files changed

+15
-18
lines changed

3 files changed

+15
-18
lines changed
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@
3636
import com.ibm.watson.health.acd.v1.cartridges.TestGetCartridgesCartridgeId;
3737
import com.ibm.watson.health.acd.v1.cartridges.TestUpdateCartridges;
3838
import com.ibm.watson.health.acd.v1.status.TestGetHealthCheckStatus;
39-
import com.ibm.watson.health.acd.v1.unit.AnnotatorForClinicalDataAcdTest;;
39+
import com.ibm.watson.health.acd.v1.unit.AnnotatorForClinicalDataAcdTest;
4040

4141

4242

@@ -66,6 +66,6 @@
6666
})
6767

6868

69-
public class AnnotatorForClinicaDataIT {
69+
public class AnnotatorForClinicalDataIT {
7070

7171
}

modules/examples/src/main/java/com/ibm/watson/health/acd/v1/AnnotatorForClinicalDataExample.java

Lines changed: 11 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,8 @@
2121

2222
import com.ibm.cloud.sdk.core.http.Response;
2323
import com.ibm.cloud.sdk.core.http.ServiceCall;
24-
import com.ibm.cloud.sdk.core.security.Authenticator;
25-
import com.ibm.cloud.sdk.core.security.BasicAuthenticator;
24+
import com.ibm.cloud.sdk.core.security.BearerTokenAuthenticator;
25+
//import com.ibm.cloud.sdk.core.http.HttpConfigOptions;
2626
import com.ibm.watson.health.acd.v1.model.AcdCartridges;
2727
import com.ibm.watson.health.acd.v1.model.AcdCartridgesList;
2828
import com.ibm.watson.health.acd.v1.model.AcdFlow;
@@ -45,33 +45,30 @@
4545
/**
4646
* Sample ACD Java SDK Calls
4747
*
48-
* NOTE: To run this sample class, replace "YOUR_APIKEY" below with your apikey
49-
* for the Annotator for Clinical Data (ACD) service. Also, make sure the "url"
50-
* reflects the ACD service instance.
48+
* NOTE: To run this sample class, replace "ACD_TOKEN" below with your ACD bearer token,
49+
* and replace "ACD_URL" with the URL for the Annotator for Clinical Data (ACD) service endpoint.
5150
*
52-
* Optional: Update the "version" if you require a specific version of ACD.
51+
* Optional: Update the "version" variable if you require a specific version of ACD.
5352
*/
5453
public class AnnotatorForClinicalDataExample {
5554

5655
protected AnnotatorForClinicalDataExample() { }
5756

5857
public static void main(String[] args) throws Exception {
59-
String apikey = "YOUR_APIKEY";
60-
//String url = "https://us-east.wh-acd.cloud.ibm.com/wh-acd/api";
61-
String url = "https://us-south.wh-acd.cloud.ibm.com/wh-acd/api";
58+
String authToken = "ACD_TOKEN";
59+
String url = "ACD_URL";
6260
String version = "2022-02-24";
6361
AnnotatorForClinicalData acd = null;
6462

65-
Authenticator authenticator = new BasicAuthenticator.Builder()
66-
.username("apikey")
67-
.password(apikey)
68-
.build();
69-
63+
BearerTokenAuthenticator authenticator = new BearerTokenAuthenticator(authToken);
7064
acd = new AnnotatorForClinicalData(
7165
version,
7266
AnnotatorForClinicalData.DEFAULT_SERVICE_NAME,
7367
authenticator);
7468
acd.setServiceUrl(url);
69+
// Uncomment the next 2 lines to disable SSL verification - not recommended
70+
//HttpConfigOptions options = new HttpConfigOptions.Builder().disableSslVerification(true).build();
71+
//acd.configureClient(options);
7572

7673

7774

pom.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
<!-- This is the version associated with the Java core. The version used
2929
here should be compatible with the version of the SDK generator used to generate
3030
your SDK code. -->
31-
<sdk-core-version>9.17.4</sdk-core-version>
31+
<sdk-core-version>9.17.5</sdk-core-version>
3232

3333
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
3434
<!-- <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding> -->
@@ -38,7 +38,7 @@
3838
<!-- <git-repository-name>whcs-java-sdk</git-repository-name> -->
3939
<nexus-staging-plugin-version>1.6.8</nexus-staging-plugin-version>
4040
<testng-version>7.4.0</testng-version>
41-
<okhttp3-version>4.9.1</okhttp3-version>
41+
<okhttp3-version>4.10.0</okhttp3-version>
4242
<surefire-version>3.0.0-M3</surefire-version>
4343
<jacoco-plugin-version>0.8.5</jacoco-plugin-version>
4444
<maven-gpg-plugin-version>3.0.1</maven-gpg-plugin-version>

0 commit comments

Comments
 (0)