Java indexer: turn NPE into warning
Summary: The internal javac implementation can throw a NullPointerException if a JavaDoc comment refers to unknown symbol.  Instead of crashing, log the error and continue.
Reviewers: #core_team, shahms, danielmoy-google
Subscribers: #core_team
@@ -82,7 +82,7 @@ public class KytheDocTreeScanner extends DocTreePathScanner<Void, DCDocComment>
Symbol sym = null;
try {
sym = (Symbol) trees.getElement(getCurrentPath());
- } catch (Symbol.CompletionFailure e) {
+ } catch (Symbol.CompletionFailure | NullPointerException e) {
logger.warningfmt(e, "Failed to resolve documentation reference: %s", tree);
}
if (sym == null) {
