mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
IDEA-68354 ('Mismatched query and update of StringBuilder' false positive)
This commit is contained in:
+6
-1
@@ -30,7 +30,8 @@ import org.jetbrains.annotations.NotNull;
|
||||
import java.util.HashSet;
|
||||
import java.util.Set;
|
||||
|
||||
public class MismatchedStringBuilderQueryUpdateInspection extends BaseInspection {
|
||||
public class MismatchedStringBuilderQueryUpdateInspection
|
||||
extends BaseInspection {
|
||||
|
||||
@NonNls
|
||||
private static final Set<String> returnSelfNames = new HashSet();
|
||||
@@ -150,6 +151,10 @@ public class MismatchedStringBuilderQueryUpdateInspection extends BaseInspection
|
||||
if(VariableAccessUtils.variableIsReturned(variable, context)){
|
||||
return false;
|
||||
}
|
||||
if (VariableAccessUtils.variableIsPassedAsMethodArgument(variable,
|
||||
context)) {
|
||||
return false;
|
||||
}
|
||||
return !VariableAccessUtils.variableIsUsedInArrayInitializer(
|
||||
variable, context);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user