Skip to content

Commit

Permalink
Tolerate CompletionFailure in JavacTypeBinding
Browse files Browse the repository at this point in the history
A previous fix has unveiled that some null bindings are sometimes
returned unexpectedly. This is a consequence of CompletionFailure
breaking the key computation.
While it's not clear what is the actual cause and best resolution
for this case, it seems like it's still better to just ignore (and
log) that to forward error and return a null binding.
  • Loading branch information
mickaelistria committed Jan 28, 2025
1 parent 1e56f91 commit 355813a
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -418,7 +418,7 @@ static void getKey(StringBuilder builder, Type typeToBuild, Name n, boolean isLe
try {
b2 = typeToBuild.tsym != null && typeToBuild.tsym.type != null && typeToBuild.tsym.type.isParameterized();
} catch( CompletionFailure cf1) {
throw new BindingKeyException(cf1);
ILog.get().error(cf1.getMessage(), cf1);
}
if ((b1 || b2) && includeParameters) {
builder.append('<');
Expand Down

0 comments on commit 355813a

Please sign in to comment.