Skip to content

Commit f694071

Browse files
committed
fix: adapt to change in ProcessCanceledException hierarchy in 2024. (2)
Signed-off-by: azerr <[email protected]>
1 parent ba619ee commit f694071

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/main/java/com/redhat/devtools/intellij/qute/psi/internal/template/resolvedtype/AbstractResolvedJavaTypeFactory.java

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,11 @@ protected boolean isValidMethod(PsiMethod method, PsiClass type) {
136136
if (!type.isInterface() && !method.getModifierList().hasExplicitModifier(PsiModifier.PUBLIC)) {
137137
return false;
138138
}
139-
} catch (IndexNotReadyException | ProcessCanceledException | CancellationException e) {
139+
} catch (ProcessCanceledException e) {
140+
//Since 2024.2 ProcessCanceledException extends CancellationException so we can't use multicatch to keep backward compatibility
141+
//TODO delete block when minimum required version is 2024.2
142+
throw e;
143+
} catch (IndexNotReadyException | CancellationException e) {
140144
throw e;
141145
} catch (Exception e) {
142146
LOGGER.log(Level.WARNING, "Error while checking if '" + method.getName() + "' is valid.", e);

0 commit comments

Comments
 (0)