Commit b44aed3b authored by Tagir Valeev's avatar Tagir Valeev
Browse files

UseBulkOperationInspection: deparenthesize qualifier

parent f1f118cc
Branches unavailable Tags unavailable
No related merge requests found
Showing with 3 additions and 3 deletions
+3 -3
......@@ -200,7 +200,7 @@ public class UseBulkOperationInspection extends AbstractBaseJavaLocalInspectionT
private void register(@NotNull PsiExpression iterable,
@NotNull BulkMethodInfo info,
@NotNull PsiReferenceExpression methodExpression) {
PsiExpression qualifier = ExpressionUtils.getQualifierOrThis(methodExpression);
PsiExpression qualifier = PsiUtil.skipParenthesizedExprDown(ExpressionUtils.getQualifierOrThis(methodExpression));
if (qualifier instanceof PsiThisExpression) {
PsiMethod method = PsiTreeUtil.getParentOfType(iterable, PsiMethod.class);
// Likely we are inside of the bulk method implementation
......
......@@ -6,6 +6,6 @@ public class Collect {
void collectNames(List<Person> persons){
List<Person> names = new ArrayList<>();
names.addAll(persons);
(names).addAll(persons);
}
}
......@@ -8,7 +8,7 @@ public class Collect {
List<Person> names = new ArrayList<>();
for(int i = 0; i<persons.size(); i = i + 1) {
Person p = persons.get(i);
names.<caret>add(p);
(names).<caret>add(p);
}
}
}
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment