I'm having an ArrayList and I'm removing elemts via arrayList.remove().
List<FooListener> listeners = new ArrayList ();
public void removeListener(FooListener listener) {
listeners.remove(listener); // critical sonar warning
}
Sonar displays it as critical issue since it might has a performance impact:
This call to "remove()" may be a performance hot spot if the collection is large.
How should this be fixed?
Also I can only "Confirm" this issue in SonarQube and not just set it to something like "Won't Fix". How can it be ignored in irrelevant cases?