}
}
// Did the process of reading the configuration fail?
if (worker.getResult() instanceof CheckstyleException) {
final CheckstyleException checkstyleException = (CheckstyleException) worker.getResult();
if (checkstyleException.getMessage().contains("Unable to instantiate DoubleCheckedLocking")) {
return blacklistAndShowMessage(location, module, "checkstyle.double-checked-locking",
"Not compatible with CheckStyle 5.6+. Remove DoubleCheckedLocking.");
}
return blacklistAndShowMessage(location, module, "checkstyle.checker-failed", "Load failed due to {0}",
checkstyleException.getMessage());
} else if (worker.getResult() instanceof IOException) {
LOG.info("CheckStyle configuration could not be loaded: " + location.getLocation(),
(IOException) worker.getResult());
return blacklistAndShowMessage(location, module, "checkstyle.file-not-found", "Not found: {0}", location.getLocation());
} else if (worker.getResult() instanceof Throwable) {
location.blacklist();
throw new CheckstyleException("Could not load configuration", (Throwable) worker.getResult());
}
return (CachedChecker) worker.getResult();
}