harmony-commits mailing list archives

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

URL: http://svn.apache.org/viewvc?rev=726566&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/KeyManager.java
    harmony/enhanced/classlib/trunk/modules/x-net/src/main/java/javax/net/ssl/KeyManagerFactory.java
    harmony/enhanced/classlib/trunk/modules/x-net/src/main/java/javax/net/ssl/KeyManagerFactorySpi.java

Modified: harmony/enhanced/classlib/trunk/modules/x-net/src/main/java/javax/net/ssl/KeyManager.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/x-net/src/main/java/javax/net/ssl/KeyManager.java?rev=726566&r1=726565&r2=726566&view=diff
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/x-net/src/main/java/javax/net/ssl/KeyManager.java
(original)
+++ harmony/enhanced/classlib/trunk/modules/x-net/src/main/java/javax/net/ssl/KeyManager.java
Sun Dec 14 14:36:04 2008
@@ -15,16 +15,7 @@
  *  limitations under the License.
  */
 
-/**
-* @author Vera Y. Petrashkova
-* @version $Revision$
-*/
-
 package javax.net.ssl;
 
-/**
- * @com.intel.drl.spec_ref
- * 
- */
 public interface KeyManager {
-}
\ No newline at end of file
+}

Modified: harmony/enhanced/classlib/trunk/modules/x-net/src/main/java/javax/net/ssl/KeyManagerFactory.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/x-net/src/main/java/javax/net/ssl/KeyManagerFactory.java?rev=726566&r1=726565&r2=726566&view=diff
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/x-net/src/main/java/javax/net/ssl/KeyManagerFactory.java
(original)
+++ harmony/enhanced/classlib/trunk/modules/x-net/src/main/java/javax/net/ssl/KeyManagerFactory.java
Sun Dec 14 14:36:04 2008
@@ -15,11 +15,6 @@
  *  limitations under the License.
  */
 
-/**
-* @author Vera Y. Petrashkova
-* @version $Revision$
-*/
-
 package javax.net.ssl;
 
 import java.security.AccessController;
@@ -28,18 +23,13 @@
 import java.security.KeyStoreException;
 import java.security.NoSuchAlgorithmException;
 import java.security.NoSuchProviderException;
+import java.security.PrivilegedAction;
 import java.security.Provider;
 import java.security.Security;
 import java.security.UnrecoverableKeyException;
 
 import org.apache.harmony.security.fortress.Engine;
 
-
-/**
- * @com.intel.drl.spec_ref
- * 
- */
-
 public class KeyManagerFactory {
     // Store KeyManagerFactory service name
     private static final String SERVICE = "KeyManagerFactory";
@@ -50,39 +40,18 @@
     // Store default property name
     private static final String PROPERTY_NAME = "ssl.KeyManagerFactory.algorithm";
 
-    // Store used provider
-    private final Provider provider;
-
-    // Store used KeyManagerFactorySpi implementation
-    private final KeyManagerFactorySpi spiImpl;
-
-    // Store used algorithm
-    private final String algorithm;
-
-    /**
-     * @com.intel.drl.spec_ref
-     *  
-     */
-    protected KeyManagerFactory(KeyManagerFactorySpi factorySpi,
-            Provider provider, String algorithm) {
-        this.provider = provider;
-        this.algorithm = algorithm;
-        this.spiImpl = factorySpi;
-    }
-
-    /**
-     * @com.intel.drl.spec_ref
-     *  
-     */
-    public final String getAlgorithm() {
-        return algorithm;
+    public static final String getDefaultAlgorithm() {
+        return AccessController.doPrivileged(new PrivilegedAction<String>() {
+            public String run() {
+                return Security.getProperty(PROPERTY_NAME);
+            }
+        });
     }
 
     /**
-     * @com.intel.drl.spec_ref
      * 
-     * throws NullPointerException if algorithm is null (instead of
-     * NoSuchAlgorithmException as in 1.4 release)
+     * @throws NullPointerException if algorithm is null (instead of NoSuchAlgorithmException
as in
+     *             1.4 release)
      */
     public static final KeyManagerFactory getInstance(String algorithm)
             throws NoSuchAlgorithmException {
@@ -91,20 +60,17 @@
         }
         synchronized (engine) {
             engine.getInstance(algorithm, null);
-            return new KeyManagerFactory((KeyManagerFactorySpi) engine.spi,
-                    engine.provider, algorithm);
+            return new KeyManagerFactory((KeyManagerFactorySpi) engine.spi, engine.provider,
+                    algorithm);
         }
     }
 
     /**
-     * @com.intel.drl.spec_ref
-     * 
-     * throws NullPointerException if algorithm is null (instead of
-     * NoSuchAlgorithmException as in 1.4 release)
+     * @throws NullPointerException if algorithm is null (instead of NoSuchAlgorithmException
as in
+     *             1.4 release)
      */
-    public static final KeyManagerFactory getInstance(String algorithm,
-            String provider) throws NoSuchAlgorithmException,
-            NoSuchProviderException {
+    public static final KeyManagerFactory getInstance(String algorithm, String provider)
+            throws NoSuchAlgorithmException, NoSuchProviderException {
         if ((provider == null) || (provider.length() == 0)) {
             throw new IllegalArgumentException("Provider is null or empty");
         }
@@ -116,13 +82,11 @@
     }
 
     /**
-     * @com.intel.drl.spec_ref
-     * 
-     * throws NullPointerException if algorithm is null (instead of
-     * NoSuchAlgorithmException as in 1.4 release)
+     * @throws NullPointerException if algorithm is null (instead of NoSuchAlgorithmException
as in
+     *             1.4 release)
      */
-    public static final KeyManagerFactory getInstance(String algorithm,
-            Provider provider) throws NoSuchAlgorithmException {
+    public static final KeyManagerFactory getInstance(String algorithm, Provider provider)
+            throws NoSuchAlgorithmException {
         if (provider == null) {
             throw new IllegalArgumentException("Provider is null");
         }
@@ -131,56 +95,44 @@
         }
         synchronized (engine) {
             engine.getInstance(algorithm, provider, null);
-            return new KeyManagerFactory((KeyManagerFactorySpi) engine.spi,
-                    provider, algorithm);
+            return new KeyManagerFactory((KeyManagerFactorySpi) engine.spi, provider, algorithm);
         }
     }
 
-    /**
-     * @com.intel.drl.spec_ref
-     *  
-     */
+    // Store used provider
+    private final Provider provider;
+
+    // Store used KeyManagerFactorySpi implementation
+    private final KeyManagerFactorySpi spiImpl;
+
+    // Store used algorithm
+    private final String algorithm;
+
+    protected KeyManagerFactory(KeyManagerFactorySpi factorySpi, Provider provider, String
algorithm) {
+        super();
+        this.provider = provider;
+        this.algorithm = algorithm;
+        this.spiImpl = factorySpi;
+    }
+
+    public final String getAlgorithm() {
+        return algorithm;
+    }
+
     public final Provider getProvider() {
         return provider;
     }
 
-    /**
-     * @com.intel.drl.spec_ref
-     *  
-     */
-    public final void init(KeyStore ks, char[] password)
-            throws KeyStoreException, NoSuchAlgorithmException,
-            UnrecoverableKeyException {
+    public final void init(KeyStore ks, char[] password) throws KeyStoreException,
+            NoSuchAlgorithmException, UnrecoverableKeyException {
         spiImpl.engineInit(ks, password);
     }
 
-    /**
-     * @com.intel.drl.spec_ref
-     *  
-     */
-    public final void init(ManagerFactoryParameters spec)
-            throws InvalidAlgorithmParameterException {
+    public final void init(ManagerFactoryParameters spec) throws InvalidAlgorithmParameterException
{
         spiImpl.engineInit(spec);
     }
 
-    /**
-     * @com.intel.drl.spec_ref
-     *  
-     */
     public final KeyManager[] getKeyManagers() {
         return spiImpl.engineGetKeyManagers();
     }
-
-    /**
-     * @com.intel.drl.spec_ref
-     *  
-     */
-    public static final String getDefaultAlgorithm() {
-        return AccessController
-                .doPrivileged(new java.security.PrivilegedAction<String>() {
-                    public String run() {
-                        return Security.getProperty(PROPERTY_NAME);
-                    }
-                });
-    }
 }

Modified: harmony/enhanced/classlib/trunk/modules/x-net/src/main/java/javax/net/ssl/KeyManagerFactorySpi.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/x-net/src/main/java/javax/net/ssl/KeyManagerFactorySpi.java?rev=726566&r1=726565&r2=726566&view=diff
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/x-net/src/main/java/javax/net/ssl/KeyManagerFactorySpi.java
(original)
+++ harmony/enhanced/classlib/trunk/modules/x-net/src/main/java/javax/net/ssl/KeyManagerFactorySpi.java
Sun Dec 14 14:36:04 2008
@@ -15,11 +15,6 @@
  *  limitations under the License.
  */
 
-/**
-* @author Vera Y. Petrashkova
-* @version $Revision$
-*/
-
 package javax.net.ssl;
 
 import java.security.InvalidAlgorithmParameterException;
@@ -28,37 +23,17 @@
 import java.security.NoSuchAlgorithmException;
 import java.security.UnrecoverableKeyException;
 
-/**
- * @com.intel.drl.spec_ref
- * 
- */
-
 public abstract class KeyManagerFactorySpi {
-    /**
-     * @com.intel.drl.spec_ref
-     *  
-     */
+    
     public KeyManagerFactorySpi() {
+        super();
     }
 
-    /**
-     * @com.intel.drl.spec_ref
-     *  
-     */
-    protected abstract void engineInit(KeyStore ks, char[] password)
-            throws KeyStoreException, NoSuchAlgorithmException,
-            UnrecoverableKeyException;
-
-    /**
-     * @com.intel.drl.spec_ref
-     *  
-     */
+    protected abstract void engineInit(KeyStore ks, char[] password) throws KeyStoreException,
+            NoSuchAlgorithmException, UnrecoverableKeyException;
+
     protected abstract void engineInit(ManagerFactoryParameters spec)
             throws InvalidAlgorithmParameterException;
 
-    /**
-     * @com.intel.drl.spec_ref
-     *  
-     */
     protected abstract KeyManager[] engineGetKeyManagers();
-}
\ No newline at end of file
+}



Mime
View raw message