diff --git a/components/org.wso2.scim2.testsuite.core/src/main/java/org/wso2/scim2/testsuite/core/tests/GroupTestImpl.java b/components/org.wso2.scim2.testsuite.core/src/main/java/org/wso2/scim2/testsuite/core/tests/GroupTestImpl.java index 3ed14cc..3eef487 100644 --- a/components/org.wso2.scim2.testsuite.core/src/main/java/org/wso2/scim2/testsuite/core/tests/GroupTestImpl.java +++ b/components/org.wso2.scim2.testsuite.core/src/main/java/org/wso2/scim2/testsuite/core/tests/GroupTestImpl.java @@ -388,9 +388,7 @@ private boolean isGroupListSorted(ArrayList returnedGroups) throws Charon boolean sorted = true; for (int i = 1; i < returnedGroups.size(); i++) { - String previous = returnedGroups.get(i - 1).getId(); - String next = returnedGroups.get(i).getId(); - if (previous.compareTo(next) > 0 && previous.compareToIgnoreCase(next) > 0) { + if (returnedGroups.get(i - 1).getId().compareTo(returnedGroups.get(i).getId()) > 0) { sorted = false; } } diff --git a/components/org.wso2.scim2.testsuite.core/src/main/java/org/wso2/scim2/testsuite/core/tests/UserTestImpl.java b/components/org.wso2.scim2.testsuite.core/src/main/java/org/wso2/scim2/testsuite/core/tests/UserTestImpl.java index e47aaa6..a9fbd0b 100644 --- a/components/org.wso2.scim2.testsuite.core/src/main/java/org/wso2/scim2/testsuite/core/tests/UserTestImpl.java +++ b/components/org.wso2.scim2.testsuite.core/src/main/java/org/wso2/scim2/testsuite/core/tests/UserTestImpl.java @@ -231,9 +231,7 @@ private boolean isUserListSorted(ArrayList userList) throws CharonExceptio boolean sorted = true; for (int i = 1; i < userList.size(); i++) { - String previous = userList.get(i - 1).getId(); - String next = userList.get(i).getId(); - if (previous.compareTo(next) > 0 && previous.compareToIgnoreCase(next) > 0) { + if (userList.get(i - 1).getId().compareTo(userList.get(i).getId()) > 0) { sorted = false; } }