Log proper warning for sources failing to parse

This commit is contained in:
aboyko
2023-01-11 17:57:25 -05:00
parent 6e243e72ae
commit 46c30aacd7

View File

@@ -268,12 +268,15 @@ public class RewriteReconciler implements JavaReconciler {
final IDocument doc = docs.get(j);
List<ReconcileProblem> problems = new ArrayList<>();
CompilationUnit cu = cus.get(k);
if (cu.getSourcePath().equals(Paths.get(URI.create(doc.getUri())))) {
Path sourcePath = Paths.get(URI.create(doc.getUri()));
if (cu.getSourcePath().equals(sourcePath)) {
k++;
collectProblems(descriptors, doc, cu, problems::add);
if (!problems.isEmpty()) {
allProblems.put(doc, problems);
}
} else {
log.warn("Failed to parse source for " + sourcePath);
}
}