Skip to content

Commit

Permalink
Merge pull request #90 from LakshanSS/2201.4.x
Browse files Browse the repository at this point in the history
[2201.4.x] Fix compile time warnings
  • Loading branch information
LakshanSS authored Apr 21, 2023
2 parents a9d75d6 + a76df57 commit e40cb91
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 2 deletions.
1 change: 0 additions & 1 deletion cosmosdb/tests/test.bal
Original file line number Diff line number Diff line change
Expand Up @@ -489,7 +489,6 @@ function testGetDocumentList() returns error? {
stream<Person, error?> result = check azureCosmosClient->getDocumentList(databaseId, containerId,
valueOfPartitionKey);
check result.forEach(isolated function(Person queryResult) {
test:assertTrue(queryResult is Person);
test:assertEquals(1234, queryResult.AccountNumber);
});
}
Expand Down
1 change: 1 addition & 0 deletions cosmosdb/types.bal
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ import ballerinax/'client.config;
@display {label: "Connection Config"}
public type ManagementClientConfig record {|
*config:ConnectionConfig;
# Excluded auth configurations (Provide primaryKey or ResourceToken instead)
never auth?;
# Base URL of the Azure Cosmos DB account
string baseUrl;
Expand Down
2 changes: 1 addition & 1 deletion cosmosdb/utils.bal
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ isolated function getTokenType(string token) returns string {
# + url - The Base URL given by the user from which we want to extract host
# + return - String representing the resource id
isolated function getHost(string url) returns string {
string replacedString = regex:replaceFirst(url, HTTPS_REGEX, EMPTY_STRING);
string replacedString = regex:replace(url, HTTPS_REGEX, EMPTY_STRING);
int? lastIndex = replacedString.lastIndexOf(FORWARD_SLASH);
if (lastIndex is int) {
replacedString = replacedString.substring(0, lastIndex);
Expand Down

0 comments on commit e40cb91

Please sign in to comment.