From f98e786878294e1202bb6697f0b7637b0da13f56 Mon Sep 17 00:00:00 2001 From: Max Medvedev Date: Thu, 9 Oct 2025 17:59:43 +0200 Subject: [PATCH] [completion] IJPL-207762 cleanup MethodParenthesesHandler GitOrigin-RevId: 7b3fca656a463fa480c7158da1fb2123bf43e3b4 --- .../completion/util/MethodParenthesesHandler.java | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/java/openapi/src/com/intellij/codeInsight/completion/util/MethodParenthesesHandler.java b/java/openapi/src/com/intellij/codeInsight/completion/util/MethodParenthesesHandler.java index 3ae37c47646f..94741479362d 100644 --- a/java/openapi/src/com/intellij/codeInsight/completion/util/MethodParenthesesHandler.java +++ b/java/openapi/src/com/intellij/codeInsight/completion/util/MethodParenthesesHandler.java @@ -1,4 +1,4 @@ -// Copyright 2000-2024 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license. +// Copyright 2000-2025 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license. package com.intellij.codeInsight.completion.util; import com.intellij.codeInsight.completion.InsertionContext; @@ -14,19 +14,19 @@ public class MethodParenthesesHandler extends ParenthesesInsertHandler overloads = JBIterable.of(allItems) .map(LookupElement::getPsiElement) .filter(PsiMethod.class) @@ -35,13 +35,14 @@ public class MethodParenthesesHandler extends ParenthesesInsertHandler methods) { + public static @NotNull ThreeState hasParameters(@NotNull List methods) { boolean hasEmpty = methods.isEmpty(); boolean hasNonEmpty = false; for (PsiMethod method : methods) { if (!method.getParameterList().isEmpty()) { hasNonEmpty = true; - } else { + } + else { hasEmpty = true; } }