File tree Expand file tree Collapse file tree 1 file changed +5
-3
lines changed
semanticdb-javac/src/main/java/com/sourcegraph/semanticdb_javac Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -84,9 +84,11 @@ public Semanticdb.AnnotationTree annotationBuilder(AnnotationTree annotation) {
8484 AssignmentTree assign = (AssignmentTree ) param ;
8585 ExpressionTree assignValue = assign .getExpression ();
8686 TreePath variableTreePath = nodes .get (assign .getVariable ());
87- Element variableSym = trees .getElement (variableTreePath );
88- String symbol = globals .semanticdbSymbol (variableSym , locals );
89- params .add (tree (assignTree (tree (idTree (symbol )), annotationParameter (assignValue ))));
87+ if (variableTreePath != null ) {
88+ Element variableSym = trees .getElement (variableTreePath );
89+ String symbol = globals .semanticdbSymbol (variableSym , locals );
90+ params .add (tree (assignTree (tree (idTree (symbol )), annotationParameter (assignValue ))));
91+ }
9092 } else {
9193 params .add (annotationParameter (param ));
9294 }
You can’t perform that action at this time.
0 commit comments