harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ndbe...@apache.org
Subject svn commit: r726569 - in /harmony/enhanced/classlib/trunk/modules/x-net/src/main/java/javax/net/ssl: SSLContext.java SSLContextSpi.java
Date Sun, 14 Dec 2008 22:47:04 GMT
Author: ndbeyer
Date: Sun Dec 14 14:47:03 2008
New Revision: 726569

URL: http://svn.apache.org/viewvc?rev=726569&view=rev
Log:
Reformat code to make it more readable, remove unnecessary comments

Modified:
    harmony/enhanced/classlib/trunk/modules/x-net/src/main/java/javax/net/ssl/SSLContext.java
    harmony/enhanced/classlib/trunk/modules/x-net/src/main/java/javax/net/ssl/SSLContextSpi.java

Modified: harmony/enhanced/classlib/trunk/modules/x-net/src/main/java/javax/net/ssl/SSLContext.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/x-net/src/main/java/javax/net/ssl/SSLContext.java?rev=726569&r1=726568&r2=726569&view=diff
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/x-net/src/main/java/javax/net/ssl/SSLContext.java
(original)
+++ harmony/enhanced/classlib/trunk/modules/x-net/src/main/java/javax/net/ssl/SSLContext.java
Sun Dec 14 14:47:03 2008
@@ -15,11 +15,6 @@
  *  limitations under the License.
  */
 
-/**
-* @author Vera Y. Petrashkova
-* @version $Revision$
-*/
-
 package javax.net.ssl;
 
 import java.security.KeyManagementException;
@@ -31,12 +26,6 @@
 
 import org.apache.harmony.security.fortress.Engine;
 
-
-/**
- * @com.intel.drl.spec_ref
- * 
- */
-
 public class SSLContext {
     // StoreSSLContext service name
     private static final String SERVICE = "SSLContext";
@@ -44,49 +33,25 @@
     // Used to access common engine functionality
     private static Engine engine = new Engine(SERVICE);
 
-    // Storeused provider
-    private final Provider provider;
-
-    // Storeused SSLContextSpi implementation
-    private final SSLContextSpi spiImpl;
-
-    // Storeused protocol
-    private final String protocol;
-
-    /*
-     * @com.intel.drl.spec_ref
-     *  
-     */
-    protected SSLContext(SSLContextSpi contextSpi, Provider provider,
-            String protocol) {
-        this.provider = provider;
-        this.protocol = protocol;
-        this.spiImpl = contextSpi;
-    }
-
     /**
-     * @com.intel.drl.spec_ref
      * 
-     * throws NullPointerException if protocol is null (instead of
-     * NoSuchAlgorithmException as in 1.4 release)
+     * @throws NullPointerException if protocol is null (instead of NoSuchAlgorithmException
as in
+     *             1.4 release)
      */
-    public static SSLContext getInstance(String protocol)
-            throws NoSuchAlgorithmException {
+    public static SSLContext getInstance(String protocol) throws NoSuchAlgorithmException
{
         if (protocol == null) {
             throw new NullPointerException("protocol is null");
         }
         synchronized (engine) {
             engine.getInstance(protocol, null);
-            return new SSLContext((SSLContextSpi) engine.spi, engine.provider,
-                    protocol);
+            return new SSLContext((SSLContextSpi) engine.spi, engine.provider, protocol);
         }
     }
 
     /**
-     * @com.intel.drl.spec_ref
      * 
-     * throws NullPointerException if protocol is null (instead of
-     * NoSuchAlgorithmException as in 1.4 release)
+     * @throws NullPointerException if protocol is null (instead of NoSuchAlgorithmException
as in
+     *             1.4 release)
      */
     public static SSLContext getInstance(String protocol, String provider)
             throws NoSuchAlgorithmException, NoSuchProviderException {
@@ -104,10 +69,8 @@
     }
 
     /**
-     * @com.intel.drl.spec_ref
-     * 
-     * throws NullPointerException if protocol is null (instead of
-     * NoSuchAlgorithmException as in 1.4 release)
+     * @throws NullPointerException if protocol is null (instead of NoSuchAlgorithmException
as in
+     *             1.4 release)
      */
     public static SSLContext getInstance(String protocol, Provider provider)
             throws NoSuchAlgorithmException {
@@ -123,77 +86,52 @@
         }
     }
 
-    /**
-     * @com.intel.drl.spec_ref
-     *  
-     */
+    private final Provider provider;
+
+    private final SSLContextSpi spiImpl;
+
+    private final String protocol;
+
+    protected SSLContext(SSLContextSpi contextSpi, Provider provider, String protocol) {
+        this.provider = provider;
+        this.protocol = protocol;
+        this.spiImpl = contextSpi;
+    }
+
     public final String getProtocol() {
         return protocol;
     }
 
-    /**
-     * @com.intel.drl.spec_ref
-     *  
-     */
     public final Provider getProvider() {
         return provider;
     }
 
-    /**
-     * @com.intel.drl.spec_ref
-     * 
-     * FIXME: check what exception will be thrown when parameters are null
-     */
     public final void init(KeyManager[] km, TrustManager[] tm, SecureRandom sr)
             throws KeyManagementException {
         spiImpl.engineInit(km, tm, sr);
     }
 
-    /**
-     * @com.intel.drl.spec_ref
-     *  
-     */
     public final SSLSocketFactory getSocketFactory() {
         return spiImpl.engineGetSocketFactory();
     }
 
-    /**
-     * @com.intel.drl.spec_ref
-     *  
-     */
     public final SSLServerSocketFactory getServerSocketFactory() {
         return spiImpl.engineGetServerSocketFactory();
     }
 
-    /**
-     * @com.intel.drl.spec_ref
-     *  
-     */
     public final SSLEngine createSSLEngine() {
         return spiImpl.engineCreateSSLEngine();
     }
 
-    /**
-     * @com.intel.drl.spec_ref
-     *  
-     */
     public final SSLEngine createSSLEngine(String peerHost, int peerPort) {
         return spiImpl.engineCreateSSLEngine(peerHost, peerPort);
     }
 
-    /**
-     * @com.intel.drl.spec_ref
-     *  
-     */
     public final SSLSessionContext getServerSessionContext() {
         return spiImpl.engineGetServerSessionContext();
     }
 
-    /**
-     * @com.intel.drl.spec_ref
-     *  
-     */
     public final SSLSessionContext getClientSessionContext() {
         return spiImpl.engineGetClientSessionContext();
     }
-}
\ No newline at end of file
+}

Modified: harmony/enhanced/classlib/trunk/modules/x-net/src/main/java/javax/net/ssl/SSLContextSpi.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/x-net/src/main/java/javax/net/ssl/SSLContextSpi.java?rev=726569&r1=726568&r2=726569&view=diff
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/x-net/src/main/java/javax/net/ssl/SSLContextSpi.java
(original)
+++ harmony/enhanced/classlib/trunk/modules/x-net/src/main/java/javax/net/ssl/SSLContextSpi.java
Sun Dec 14 14:47:03 2008
@@ -15,70 +15,29 @@
  *  limitations under the License.
  */
 
-/**
-* @author Vera Y. Petrashkova
-* @version $Revision$
-*/
-
 package javax.net.ssl;
 
 import java.security.KeyManagementException;
 import java.security.SecureRandom;
 
-/**
- * @com.intel.drl.spec_ref
- * 
- */
-
 public abstract class SSLContextSpi {
-    /**
-     * @com.intel.drl.spec_ref
-     *  
-     */
     public SSLContextSpi() {
+        super();
     }
 
-    /**
-     * @com.intel.drl.spec_ref
-     *  
-     */
-    protected abstract void engineInit(KeyManager[] km, TrustManager[] tm,
-            SecureRandom sr) throws KeyManagementException;
-
-    /**
-     * @com.intel.drl.spec_ref
-     *  
-     */
+    protected abstract void engineInit(KeyManager[] km, TrustManager[] tm, SecureRandom sr)
+            throws KeyManagementException;
+
     protected abstract SSLSocketFactory engineGetSocketFactory();
 
-    /**
-     * @com.intel.drl.spec_ref
-     *  
-     */
     protected abstract SSLServerSocketFactory engineGetServerSocketFactory();
 
-    /**
-     * @com.intel.drl.spec_ref
-     *  
-     */
     protected abstract SSLEngine engineCreateSSLEngine(String host, int port);
 
-    /**
-     * @com.intel.drl.spec_ref
-     *  
-     */
     protected abstract SSLEngine engineCreateSSLEngine();
 
-    /**
-     * @com.intel.drl.spec_ref
-     *  
-     */
     protected abstract SSLSessionContext engineGetServerSessionContext();
 
-    /**
-     * @com.intel.drl.spec_ref
-     *  
-     */
     protected abstract SSLSessionContext engineGetClientSessionContext();
 
-}
\ No newline at end of file
+}



Mime
View raw message