From 66d3dac73bded1b911f3e9fd88458a4ad92539b2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9E=97=E4=B8=87=E7=A8=8B?= <1498425439@qq.com> Date: Mon, 27 Mar 2023 19:05:45 +0800 Subject: [PATCH] try Exception fixed #29 --- .../linwancen/plugin/show/java/doc/PsiMethodToPsiDoc.java | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/main/idea/io/github/linwancen/plugin/show/java/doc/PsiMethodToPsiDoc.java b/src/main/idea/io/github/linwancen/plugin/show/java/doc/PsiMethodToPsiDoc.java index e71077e..ea6f171 100644 --- a/src/main/idea/io/github/linwancen/plugin/show/java/doc/PsiMethodToPsiDoc.java +++ b/src/main/idea/io/github/linwancen/plugin/show/java/doc/PsiMethodToPsiDoc.java @@ -48,7 +48,12 @@ class PsiMethodToPsiDoc { @Nullable static PsiDocComment supperMethodDoc(@NotNull PsiMethod psiMethod) { - @NotNull PsiMethod[] superMethods = psiMethod.findSuperMethods(); + @NotNull PsiMethod[] superMethods; + try { + superMethods = psiMethod.findSuperMethods(); + } catch (Exception e) { + return null; + } for (@NotNull PsiMethod superMethod : superMethods) { @Nullable PsiDocComment superDoc = OwnerToPsiDocUtils.methodDoc(superMethod); if (superDoc != null) {