AnalysisException thrownException = task.getException();
HtmlEntry htmlEntry = null;
synchronized (cacheLock) {
SourceEntry sourceEntry = cache.get(source);
if (sourceEntry == null) {
throw new ObsoleteSourceAnalysisException(source);
} else if (!(sourceEntry instanceof HtmlEntry)) {
// This shouldn't be possible because we should never have performed the task if the source
// didn't represent an HTML file, but check to be safe.
throw new AnalysisException(
"Internal error: attempting to resolve non-HTML file as an HTML file: "