Bug 722570 - make BaseResource.{getConnectionManager,enableTLSConnectionManager} thread-safe. r=rnewman
authorNick Alexander <nalexander@mozilla.com>
Fri, 02 Mar 2012 17:36:15 -0800
changeset 88270 df9a4129745e16853fd0dfaceaa9c2f4a0e8b303
parent 88269 e24e2c2da25807feff39ed060a0f5df6366ef139
child 88271 6f1239da8d0ed2217c4af69b67b9bea4d94ab66d
push id22185
push usergszorc@mozilla.com
push dateMon, 05 Mar 2012 23:18:44 +0000
treeherdermozilla-central@7d0d1108a14e [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersrnewman
bugs722570
milestone13.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 722570 - make BaseResource.{getConnectionManager,enableTLSConnectionManager} thread-safe. r=rnewman
mobile/android/base/sync/net/BaseResource.java
--- a/mobile/android/base/sync/net/BaseResource.java
+++ b/mobile/android/base/sync/net/BaseResource.java
@@ -172,17 +172,17 @@ public class BaseResource implements Res
   public static ClientConnectionManager enablePlainHTTPConnectionManager() {
     synchronized (connManagerMonitor) {
       ThreadSafeClientConnManager cm = new ThreadSafeClientConnManager();
       connManager = cm;
       return cm;
     }
   }
 
-  public static ClientConnectionManager enableTLSConnectionManager() throws KeyManagementException, NoSuchAlgorithmException  {
+  private static ClientConnectionManager enableTLSConnectionManager() throws KeyManagementException, NoSuchAlgorithmException  {
     SSLContext sslContext = SSLContext.getInstance("TLS");
     sslContext.init(null, null, new SecureRandom());
     SSLSocketFactory sf = new TLSSocketFactory(sslContext);
     SchemeRegistry schemeRegistry = new SchemeRegistry();
     schemeRegistry.register(new Scheme("https", 443, sf));
     schemeRegistry.register(new Scheme("http", 80, new PlainSocketFactory()));
     ThreadSafeClientConnManager cm = new ThreadSafeClientConnManager(schemeRegistry);
     connManager = cm;