Skip to content

Commit

Permalink
Fixes eclipse-jdt#1186 (possibly) - exceptions have wrong name in met…
Browse files Browse the repository at this point in the history
…hod mouseover

popup box

Signed-off-by: Rob Stryker <[email protected]>
Also-By: Mickael Istria <[email protected]>
  • Loading branch information
Rob Stryker authored and mickaelistria committed Jan 31, 2025
1 parent c5c2663 commit 03a3b01
Showing 1 changed file with 7 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -313,13 +313,13 @@ private IMethod resolved(IMethod from) {
* @return the key including the exception suffix
*/
private String computeKeyWithThrowsFromJavadoc(IMethod method) {
String[] exceptions = Arrays.stream(getExceptionTypes()).map(ITypeBinding::getKey).toArray(String[]::new);
if (method != null) {
try {
exceptions = method.getExceptionTypes();
} catch (JavaModelException ex) {
// ignore
}
String[] exceptions = null;
try {
exceptions = method.getExceptionTypes();
} catch (JavaModelException ex) {
}
if (exceptions == null || exceptions.length == 0) {
exceptions = Arrays.stream(getExceptionTypes()).map(ITypeBinding::getKey).toArray(String[]::new);
}
return getKey() + Arrays.stream(exceptions).map(t -> '|' + t.replace('.', '/')).collect(Collectors.joining());
}
Expand Down

0 comments on commit 03a3b01

Please sign in to comment.