[java-inspections] DuplicateExpressions: recognize stable methods from GetterDescriptor; add some methods from java.io.File

Fixes to some extent IDEA-114778 IntelliJ: add "locate multiple occurrence"

GitOrigin-RevId: a20d9db31a79cdc963075993a09a6a6115947621
This commit is contained in:
Tagir Valeev
2024-09-02 17:38:09 +02:00
committed by intellij-monorepo-bot
parent cb1b1c7f61
commit 3c7271ac4e
2 changed files with 7 additions and 1 deletions

View File

@@ -36,7 +36,9 @@ public final class GetterDescriptor extends PsiVarDescriptor {
CallMatcher.instanceCall("java.lang.reflect.Method", "getReturnType"),
CallMatcher.instanceCall(CommonClassNames.JAVA_LANG_CLASS, "getName", "isInterface", "isArray", "isPrimitive", "isSynthetic",
"isAnonymousClass", "isLocalClass", "isMemberClass", "getDeclaringClass", "getEnclosingClass",
"getSimpleName", "getCanonicalName")
"getSimpleName", "getCanonicalName"),
CallMatcher.instanceCall(CommonClassNames.JAVA_IO_FILE, "getName", "getParent", "getPath", "getAbsolutePath",
"getParentFile", "getAbsoluteFile", "toPath")
);
private final @NotNull PsiMethod myGetter;
private final boolean myStable;