LPS-50484 Use a thread-safe alternative in place of java.util.HashSet