use .contains

Reviewed By: achen1

Differential Revision: D5242469

fbshipit-source-id: d666b1264e6e40bb2649ab91bc63ecb6decb1532
This commit is contained in:
Aaron Chiu 2017-06-14 16:23:15 -07:00 committed by Facebook Github Bot
parent 71401c1185
commit 7464d5e1a2
1 changed files with 1 additions and 1 deletions

View File

@ -28,7 +28,7 @@ public class ReactMarker {
@DoNotStrip
public static void addListener(MarkerListener listener) {
synchronized(sListeners) {
if (sListeners.indexOf(listener) == -1) {
if (!sListeners.contains(listener)) {
sListeners.add(listener);
}
}