Bug 960171 - Collections.synchronizedMap is unnecessary in PanelManager. r=mleibovic
authorRaymond Etornam Agbeame(:retornam) <mozbugs.retornam@gmail.com>
Wed, 22 Jan 2014 14:07:25 -0500
changeset 164789 530cd49cb5d8c5cbc3dfd272d70d0b2943c8684e
parent 164788 cbb2876bdaf35266f1521bb72cb928ab884da68e
child 164790 3ea5b5cc5817d00bcf3b69c141315426e4f119d5
push id26061
push usercbook@mozilla.com
push dateThu, 23 Jan 2014 09:19:45 +0000
treeherdermozilla-central@96e031fede3f [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmleibovic
bugs960171
milestone29.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 960171 - Collections.synchronizedMap is unnecessary in PanelManager. r=mleibovic
mobile/android/base/home/PanelManager.java
--- a/mobile/android/base/home/PanelManager.java
+++ b/mobile/android/base/home/PanelManager.java
@@ -16,17 +16,16 @@ import org.json.JSONObject;
 
 import android.content.Context;
 import android.content.SharedPreferences;
 import android.preference.PreferenceManager;
 import android.text.TextUtils;
 import android.util.Log;
 
 import java.util.ArrayList;
-import java.util.Collections;
 import java.util.HashMap;
 import java.util.List;
 import java.util.Map;
 import java.util.concurrent.atomic.AtomicInteger;
 
 public class PanelManager implements GeckoEventListener {
     private static final String LOGTAG = "GeckoPanelManager";
 
@@ -46,17 +45,17 @@ public class PanelManager implements Gec
 
     public interface RequestCallback {
         public void onComplete(List<PanelInfo> panelInfos);
     }
 
     private static AtomicInteger sRequestId = new AtomicInteger(0);
 
     // Stores set of pending request callbacks.
-    private static final Map<Integer, RequestCallback> sCallbacks = Collections.synchronizedMap(new HashMap<Integer, RequestCallback>());
+    private static final Map<Integer, RequestCallback> sCallbacks = new HashMap<Integer, RequestCallback>();
 
     /**
      * Asynchronously fetches list of available panels from Gecko.
      *
      * @param callback onComplete will be called on the UI thread.
      */
     public void requestAvailablePanels(RequestCallback callback) {
         final int requestId = sRequestId.getAndIncrement();