Skip to content

Commit f7c5bc7

Browse files
Address PR comments
1 parent ba8d321 commit f7c5bc7

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

src/main/java/io/cdap/plugin/servicenow/apiclient/ServiceNowTableAPIClientImpl.java

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -79,13 +79,11 @@ public class ServiceNowTableAPIClientImpl extends RestAPIClient {
7979
private static final String GLIDE_DATE_TIME_DATATYPE = "glide_date_time";
8080
private static final Gson GSON = new Gson();
8181
private final ServiceNowConnectorConfig conf;
82-
public final Boolean useConnection;
8382
public final SchemaType schemaType;
8483
public static JsonArray serviceNowJsonResultArray;
8584

8685
public ServiceNowTableAPIClientImpl(ServiceNowConnectorConfig conf, Boolean useConnection) {
8786
this.conf = conf;
88-
this.useConnection = useConnection;
8987
this.schemaType = getSchemaTypeBasedOnUseConnection(useConnection);
9088
}
9189

src/main/java/io/cdap/plugin/servicenow/apiclient/ServiceNowTableAPIRequestBuilder.java

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323

2424
import java.net.URLEncoder;
2525
import java.util.Arrays;
26+
import javax.annotation.Nullable;
2627

2728
/**
2829
* ServiceNowTableAPIRequestBuilder.
@@ -51,6 +52,9 @@ public class ServiceNowTableAPIRequestBuilder extends RestAPIRequest.Builder {
5152

5253
public ServiceNowTableAPIRequestBuilder(String instanceBaseUrl, String tableName, boolean isSchemaRequired,
5354
SchemaType schemaType) {
55+
// if it is a schema call, this URL value will get overridden by the later section.
56+
this.setUrl(String.format(TABLE_API_URL_TEMPLATE, instanceBaseUrl, tableName));
57+
5458
if (isSchemaRequired) {
5559
if (SchemaType.METADATA_API_BASED == schemaType) {
5660
this.setUrl(String.format(METADATA_API_URL_TEMPLATE, instanceBaseUrl, tableName));
@@ -60,8 +64,6 @@ public ServiceNowTableAPIRequestBuilder(String instanceBaseUrl, String tableName
6064
this.setUrl(String.format(TABLE_API_URL_TEMPLATE, instanceBaseUrl, tableName));
6165
this.setLimit(1);
6266
}
63-
} else {
64-
this.setUrl(String.format(TABLE_API_URL_TEMPLATE, instanceBaseUrl, tableName));
6567
}
6668
}
6769

0 commit comments

Comments
 (0)