mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
i18n: ensure concatenations passed to @NonNls params are not suggested to i18n
GitOrigin-RevId: 6c727e521fba1707694f493b719c9babaec11392
This commit is contained in:
committed by
intellij-monorepo-bot
parent
b87e55a980
commit
8a4800add7
@@ -110,12 +110,15 @@ public class JavaI18nUtil extends I18nUtil {
|
||||
static boolean isPassedToAnnotatedParam(@NotNull UExpression expression,
|
||||
@Nullable final Set<? super PsiModifierListOwner> nonNlsTargets) {
|
||||
UElement parent = UastUtils.skipParenthesizedExprUp(expression.getUastParent());
|
||||
if (parent instanceof UPolyadicExpression) {
|
||||
parent = UastUtils.skipParenthesizedExprUp(parent.getUastParent());
|
||||
}
|
||||
UCallExpression callExpression = UastUtils.getUCallExpression(parent);
|
||||
if (callExpression == null) return false;
|
||||
|
||||
List<UExpression> arguments = callExpression.getValueArguments();
|
||||
OptionalInt idx = IntStream.range(0, arguments.size())
|
||||
.filter(i -> expression.equals(UastUtils.skipParenthesizedExprDown(arguments.get(i))))
|
||||
.filter(i -> UastUtils.isUastChildOf(expression, arguments.get(i), false))
|
||||
.findFirst();
|
||||
|
||||
if (!idx.isPresent()) return false;
|
||||
|
||||
+1
@@ -17,6 +17,7 @@ class C extends B{
|
||||
|
||||
void bar(C c) {
|
||||
c.foo("text");
|
||||
c.foo("text" + " " + "text");
|
||||
new C().foo(("text"));
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user