#vulnerable code 
                                protected void handleException(Exception e, Architecture arch,
            String version) {
        if (!config().isForcingCache()) {
            config().setForcingCache(true);
            log.warn(
                    "There was an error managing {} {} ({}) ... trying again forcing to use cache",
                    getDriverName(), version, e.getMessage());
            manage(arch, version);
        } else {
            throw new WebDriverManagerException(e);
        }
    } 
                            #location 3 
                            #vulnerability type THREAD_SAFETY_VIOLATION
#fixed code
                                protected void handleException(Exception e, Architecture arch,
            String version) {
        String errorMessage = String.format(
                "There was an error managing %s %s (%s)", getDriverName(),
                version, e.getMessage());
        if (!config().isForcingCache()) {
            config().setForcingCache(true);
            log.warn("{} ... trying again forcing to use cache", errorMessage);
            manage(arch, version);
        } else {
            log.error("{}", errorMessage, e);
            throw new WebDriverManagerException(e);
        }
    }