mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-05-03 03:37:58 +07:00
[codeInsight] IDEA-240288 Inspection for StringBuilder.toString().substring()
This patch replaces the excessive extraction of a qualifier via `ExpressionUtils.getEffectiveQualifier` with a simple `call.getMethodExpression().getQualifierExpression` Signed-off-by: Nikita Eshkeev <nikita.eshkeev@jetbrains.com> GitOrigin-RevId: 4a4f1c6b218c63691fa2bd4610e9901874d3c712
This commit is contained in:
committed by
intellij-monorepo-bot
parent
b12dfe5539
commit
ce7dae26b1
@@ -27,6 +27,8 @@ class StringBuilderToString {
|
||||
System.out.println(new StringBuilder().substring(1, 3).length());
|
||||
|
||||
"hello".substring(sb.toString());
|
||||
System.out.println((((new StringBuilder()))).substring(1, 3));
|
||||
System.out.println((new StringBuilder()).substring(1, 3).length());
|
||||
}
|
||||
|
||||
void builder(StringBuilder sb) {
|
||||
|
||||
@@ -20,6 +20,8 @@ class StringBuilderToString {
|
||||
System.out.println(new StringBuilder().substring(1, 3).length());
|
||||
|
||||
"hello".substring(sb.toString());
|
||||
System.out.println((((new StringBuilder()))).substring(1, 3));
|
||||
System.out.println((new StringBuilder()).substring(1, 3).length());
|
||||
}
|
||||
|
||||
void builder(StringBuilder sb) {
|
||||
|
||||
Reference in New Issue
Block a user