mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-01-05 01:50:56 +07:00
[java-inspection] IDEA-324133 not resolve for RedundantExplicitChronoFieldInspection
GitOrigin-RevId: 883695de18261d6202065f6fa4f640d6a0de4d49
This commit is contained in:
committed by
intellij-monorepo-bot
parent
045798e76b
commit
28bafa0ae3
@@ -32,16 +32,13 @@ public class RedundantExplicitChronoFieldInspection extends AbstractBaseJavaLoca
|
||||
return new JavaElementVisitor() {
|
||||
@Override
|
||||
public void visitMethodCallExpression(@NotNull PsiMethodCallExpression call) {
|
||||
PsiMethod method = call.resolveMethod();
|
||||
if (method == null) {
|
||||
return;
|
||||
}
|
||||
String methodName = method.getName();
|
||||
String methodName = call.getMethodExpression().getReferenceName();
|
||||
if (!"get".equals(methodName) && !"with".equals(methodName) &&
|
||||
!"plus".equals(methodName) && !"minus".equals(methodName)) {
|
||||
return;
|
||||
}
|
||||
if (!CAN_BE_SIMPLIFIED_MATCHERS.methodMatches(method)) return;
|
||||
|
||||
if (!CAN_BE_SIMPLIFIED_MATCHERS.matches(call)) return;
|
||||
int fieldArgumentIndex = 1;
|
||||
if ("get".equals(methodName) || "with".equals(methodName)) {
|
||||
fieldArgumentIndex = 0;
|
||||
|
||||
Reference in New Issue
Block a user