From 7464d5e1a2db87871a3854560ff253aeec809875 Mon Sep 17 00:00:00 2001 From: Aaron Chiu Date: Wed, 14 Jun 2017 16:23:15 -0700 Subject: [PATCH] use .contains Reviewed By: achen1 Differential Revision: D5242469 fbshipit-source-id: d666b1264e6e40bb2649ab91bc63ecb6decb1532 --- .../src/main/java/com/facebook/react/bridge/ReactMarker.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ReactAndroid/src/main/java/com/facebook/react/bridge/ReactMarker.java b/ReactAndroid/src/main/java/com/facebook/react/bridge/ReactMarker.java index 1d0d802ba..60a4d42b3 100644 --- a/ReactAndroid/src/main/java/com/facebook/react/bridge/ReactMarker.java +++ b/ReactAndroid/src/main/java/com/facebook/react/bridge/ReactMarker.java @@ -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); } }