Skip to content

Commit

Permalink
Fix bug
Browse files Browse the repository at this point in the history
  • Loading branch information
Tharsanan1 authored and tharindu1st committed Mar 4, 2024
1 parent 0bb86db commit fca5497
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -530,9 +530,12 @@ private Boolean isJWTExpired(JWTValidationInfo payload) {
*
* @param list1 The first list to check.
* @param list2 The second list to check against.
* @return true if at least one element from list1 exists in list2, otherwise false.
* @return true if list1 is empty else if at least one element from list1 exists in list2, otherwise false.
*/
public static boolean checkAnyExist(List<String> list1, List<String> list2) {
if (list1.size() == 0) {
return true;
}
return list1.stream().anyMatch(list2::contains);
}
}

0 comments on commit fca5497

Please sign in to comment.