Changing type of extraInfo from HashMap to ConcurrentHasMap to avoid ConcurrentModificationException while reading exception message by parallel threads.
import java.util.HashMap;
import java.util.Map;
import java.util.Optional;
+import java.util.concurrent.ConcurrentHashMap;
import java.util.stream.Collectors;
import java.util.stream.Stream;
private static final String HOST_NAME = HostIdentifier.getHostName();
private static final String HOST_ADDRESS = HostIdentifier.getHostAddress();
- private final Map<String, String> extraInfo = new HashMap<>();
+ private final Map<String, String> extraInfo = new ConcurrentHashMap<>();
public WebDriverException() {
super();
