am 8868084e: Do not initialize SSLSocketFactory too early

* commit '8868084e528a9f77ebeee5b4c20416ca9939b471':
  Do not initialize SSLSocketFactory too early
diff --git a/src/org/apache/http/conn/ssl/SSLSocketFactory.java b/src/org/apache/http/conn/ssl/SSLSocketFactory.java
index 1be6c3a..9195b4f 100644
--- a/src/org/apache/http/conn/ssl/SSLSocketFactory.java
+++ b/src/org/apache/http/conn/ssl/SSLSocketFactory.java
@@ -150,19 +150,26 @@
     
     public static final X509HostnameVerifier STRICT_HOSTNAME_VERIFIER 
         = new StrictHostnameVerifier();
-    /**
-     * The factory using the default JVM settings for secure connections.
+
+    /*
+     * Put defaults into holder class to avoid class preloading creating an
+     * instance of the classes referenced.
      */
-    private static final SSLSocketFactory DEFAULT_FACTORY = new SSLSocketFactory();
-    
+    private static class NoPreloadHolder {
+        /**
+         * The factory using the default JVM settings for secure connections.
+         */
+        private static final SSLSocketFactory DEFAULT_FACTORY = new SSLSocketFactory();
+    }
+
     /**
      * Gets an singleton instance of the SSLProtocolSocketFactory.
      * @return a SSLProtocolSocketFactory
      */
     public static SSLSocketFactory getSocketFactory() {
-        return DEFAULT_FACTORY;
+        return NoPreloadHolder.DEFAULT_FACTORY;
     }
-    
+
     private final SSLContext sslcontext;
     private final javax.net.ssl.SSLSocketFactory socketfactory;
     private final HostNameResolver nameResolver;