mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-04-30 10:20:15 +07:00
[java-inspections] UseBulkOperation: Fix missing warning when super is a qualifier
GitOrigin-RevId: 3e482302d12de0997964e9826c396456b86ec921
This commit is contained in:
committed by
intellij-monorepo-bot
parent
91ddf5b7f4
commit
e6bd673b2a
@@ -0,0 +1,22 @@
|
||||
// "Replace iteration with bulk 'Collection.addAll' call" "true"
|
||||
|
||||
import java.util.*;
|
||||
|
||||
public class Main {
|
||||
static class MyList extends AbstractCollection<String> {
|
||||
@Override
|
||||
public Iterator<String> iterator() {
|
||||
return Collections.emptyIterator();
|
||||
}
|
||||
|
||||
@Override
|
||||
public int size() {
|
||||
return 0;
|
||||
}
|
||||
|
||||
public boolean myAdd(Collection<? extends String> c) {
|
||||
super.addAll(c);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,25 @@
|
||||
// "Replace iteration with bulk 'Collection.addAll' call" "false"
|
||||
|
||||
import java.util.*;
|
||||
|
||||
public class Main {
|
||||
static class MyList extends AbstractCollection<String> {
|
||||
@Override
|
||||
public Iterator<String> iterator() {
|
||||
return Collections.emptyIterator();
|
||||
}
|
||||
|
||||
@Override
|
||||
public int size() {
|
||||
return 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean addAll(Collection<? extends String> c) {
|
||||
for (String e : c) {
|
||||
super.a<caret>dd(e);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,24 @@
|
||||
// "Replace iteration with bulk 'Collection.addAll' call" "true"
|
||||
|
||||
import java.util.*;
|
||||
|
||||
public class Main {
|
||||
static class MyList extends AbstractCollection<String> {
|
||||
@Override
|
||||
public Iterator<String> iterator() {
|
||||
return Collections.emptyIterator();
|
||||
}
|
||||
|
||||
@Override
|
||||
public int size() {
|
||||
return 0;
|
||||
}
|
||||
|
||||
public boolean myAdd(Collection<? extends String> c) {
|
||||
for (String e : c) {
|
||||
super.<caret>add(e);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user