Skip to content

Commit

Permalink
Strip exception from CompletionProposal.getSignature()
Browse files Browse the repository at this point in the history
  • Loading branch information
mickaelistria committed Dec 16, 2024
1 parent 5ad966d commit b643067
Showing 1 changed file with 7 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -179,8 +179,13 @@ static void createTypeVariable(ITypeBinding typeVariable, StringBuilder completi

static char[] getSignature(IMethodBinding methodBinding) {
String fullKey = methodBinding.getKey().replace('/', '.');
String justReturn = fullKey.substring(fullKey.indexOf('('));
return justReturn.toCharArray();
String removeName = fullKey.substring(fullKey.indexOf('('));
int firstException = removeName.indexOf('|');
if (firstException > 0) {
return removeName.substring(0, firstException).toCharArray();
} else {
return removeName.toCharArray();
}
}

static char[] getSignature(ITypeBinding typeBinding) {
Expand Down

0 comments on commit b643067

Please sign in to comment.