Skip to content

Commit

Permalink
fix: bump core to 9.17.4
Browse files Browse the repository at this point in the history
  • Loading branch information
dlangst committed Feb 14, 2023
1 parent f26219f commit 8f07668
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
import java.util.Properties;

import com.ibm.cloud.sdk.core.http.HttpConfigOptions;
import com.ibm.cloud.sdk.core.security.BearerTokenAuthenticator;
import com.ibm.cloud.sdk.core.security.IamAuthenticator;
import com.ibm.cloud.sdk.core.security.NoAuthAuthenticator;
import com.ibm.watson.health.acd.v1.common.Constants;
Expand Down Expand Up @@ -87,7 +88,14 @@ private void loadProperties() {
*/
public void setUp() throws Exception {

if ((getProperty(Constants.APIKEY) == null) || getProperty(Constants.APIKEY).trim().length() == 0) {
if (getProperty(Constants.BEARER_TOKEN) != null) {
service = new AnnotatorForClinicalData(getProperty(Constants.VERSION),
"AnnotatorForClinicalData", new BearerTokenAuthenticator(getProperty(Constants.BEARER_TOKEN)));
service.setServiceUrl(getProperty(Constants.URL));
HttpConfigOptions options = new HttpConfigOptions.Builder().disableSslVerification(true).build();
service.configureClient(options);
}
else if ((getProperty(Constants.APIKEY) == null) || getProperty(Constants.APIKEY).trim().length() == 0) {
service = new AnnotatorForClinicalData(getProperty(Constants.VERSION),
"AnnotatorForClinicalData", new NoAuthAuthenticator());
service.setServiceUrl(getProperty(Constants.URL));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@

public class Constants {
public static final String URL = "URL";
public static final String BEARER_TOKEN = "BEARER_TOKEN";
public static final String APIKEY = "APIKEY";
public static final String VERSION = "VERSION";
public static final String IAM_URL = "IAM_URL";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,9 @@ public static void testTemporal(Temporal annotation) {
CustomCollection temporalType = annotation.getTemporalType();
TestCustomCollection.testCustomCollectionByName(temporalType, "dateScore");
@SuppressWarnings("unchecked")
Map<String, Double> temporalTypeMap = (Map<String, Double>)annotation.getTemporalTypeMap();
for (Map.Entry<String, Double> entry : temporalTypeMap.entrySet()) {
Map<String, ?> temporalTypeMap = (Map<String, ?>)annotation.getTemporalTypeMap();
for (Map.Entry<String, ?> entry : temporalTypeMap.entrySet()) {
Assert.assertTrue(entry.getKey() != null);
Assert.assertTrue(entry.getValue() >= 0);
}
//Map<?, ?> temporalTypeMap = annotation.getTemporalTypeMap();
//if (!temporalTypeMap.isEmpty()) {
Expand Down
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
<!-- This is the version associated with the Java core. The version used
here should be compatible with the version of the SDK generator used to generate
your SDK code. -->
<sdk-core-version>9.14.1</sdk-core-version>
<sdk-core-version>9.17.4</sdk-core-version>

<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<!-- <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding> -->
Expand Down

0 comments on commit 8f07668

Please sign in to comment.