Skip to content

Commit

Permalink
Add suggestions from code review
Browse files Browse the repository at this point in the history
  • Loading branch information
ravinperera00 committed Sep 26, 2024
1 parent fa0cf9b commit 47f7074
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ public static BArray sort(BArray arr, Object direction, Object func) {
// Check if the array type is an Ordered type, otherwise a key function is mandatory
if (!isOrderedType(arrType) && function == null) {
throw ErrorCreator.createError(getModulePrefixedReason(ARRAY_LANG_LIB, INVALID_TYPE_TO_SORT),
StringUtils.fromString("Valid key function required"));
StringUtils.fromString("valid key function required"));
}
Object[][] sortArr = new Object[arr.size()][2];
Object[][] sortArrClone = new Object[arr.size()][2];
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
/**
* A utility class containing methods needed for the sort operation on tuples and arrays.
*
* @since 2201.10.0
* @since 2201.11.0
*/
public class SortUtils {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1946,7 +1946,7 @@ function testSortNegative() {
assertTrue(res is error);
if(res is error) {
assertValueEquality("{ballerina/lang.array}SortOperationError", res.message());
assertValueEquality("Valid key function required", <string> checkpanic res.detail()["message"]);
assertValueEquality("valid key function required", <string> checkpanic res.detail()["message"]);
}
}
}
Expand Down

0 comments on commit 47f7074

Please sign in to comment.