harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From telli...@apache.org
Subject svn commit: r821750 - /harmony/enhanced/classlib/trunk/modules/security/src/main/java/common/java/security/
Date Mon, 05 Oct 2009 10:47:54 GMT
Author: tellison
Date: Mon Oct  5 10:47:53 2009
New Revision: 821750

URL: http://svn.apache.org/viewvc?rev=821750&view=rev
Log:
Code tidy-up in security module, including:
 - add lots of missing @override tags
 - add missing / remove unnecessary NLS tags
 - simplify some else clauses
 - fix javadoc errors

Modified:
    harmony/enhanced/classlib/trunk/modules/security/src/main/java/common/java/security/AlgorithmParameters.java
    harmony/enhanced/classlib/trunk/modules/security/src/main/java/common/java/security/AllPermission.java
    harmony/enhanced/classlib/trunk/modules/security/src/main/java/common/java/security/AllPermissionCollection.java
    harmony/enhanced/classlib/trunk/modules/security/src/main/java/common/java/security/BasicPermission.java
    harmony/enhanced/classlib/trunk/modules/security/src/main/java/common/java/security/BasicPermissionCollection.java
    harmony/enhanced/classlib/trunk/modules/security/src/main/java/common/java/security/CodeSigner.java
    harmony/enhanced/classlib/trunk/modules/security/src/main/java/common/java/security/CodeSource.java
    harmony/enhanced/classlib/trunk/modules/security/src/main/java/common/java/security/DigestInputStream.java
    harmony/enhanced/classlib/trunk/modules/security/src/main/java/common/java/security/DigestOutputStream.java
    harmony/enhanced/classlib/trunk/modules/security/src/main/java/common/java/security/Identity.java
    harmony/enhanced/classlib/trunk/modules/security/src/main/java/common/java/security/IdentityScope.java
    harmony/enhanced/classlib/trunk/modules/security/src/main/java/common/java/security/KeyFactory.java
    harmony/enhanced/classlib/trunk/modules/security/src/main/java/common/java/security/KeyPairGenerator.java
    harmony/enhanced/classlib/trunk/modules/security/src/main/java/common/java/security/KeyStore.java
    harmony/enhanced/classlib/trunk/modules/security/src/main/java/common/java/security/MessageDigest.java
    harmony/enhanced/classlib/trunk/modules/security/src/main/java/common/java/security/MessageDigestSpi.java
    harmony/enhanced/classlib/trunk/modules/security/src/main/java/common/java/security/Permission.java
    harmony/enhanced/classlib/trunk/modules/security/src/main/java/common/java/security/PermissionCollection.java
    harmony/enhanced/classlib/trunk/modules/security/src/main/java/common/java/security/Policy.java
    harmony/enhanced/classlib/trunk/modules/security/src/main/java/common/java/security/PrivilegedActionException.java
    harmony/enhanced/classlib/trunk/modules/security/src/main/java/common/java/security/ProtectionDomain.java
    harmony/enhanced/classlib/trunk/modules/security/src/main/java/common/java/security/Provider.java
    harmony/enhanced/classlib/trunk/modules/security/src/main/java/common/java/security/SecureClassLoader.java
    harmony/enhanced/classlib/trunk/modules/security/src/main/java/common/java/security/SecureRandom.java
    harmony/enhanced/classlib/trunk/modules/security/src/main/java/common/java/security/Security.java
    harmony/enhanced/classlib/trunk/modules/security/src/main/java/common/java/security/Signature.java
    harmony/enhanced/classlib/trunk/modules/security/src/main/java/common/java/security/SignatureSpi.java
    harmony/enhanced/classlib/trunk/modules/security/src/main/java/common/java/security/Signer.java
    harmony/enhanced/classlib/trunk/modules/security/src/main/java/common/java/security/Timestamp.java
    harmony/enhanced/classlib/trunk/modules/security/src/main/java/common/java/security/UnresolvedPermission.java

Modified: harmony/enhanced/classlib/trunk/modules/security/src/main/java/common/java/security/AlgorithmParameters.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/security/src/main/java/common/java/security/AlgorithmParameters.java?rev=821750&r1=821749&r2=821750&view=diff
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/security/src/main/java/common/java/security/AlgorithmParameters.java (original)
+++ harmony/enhanced/classlib/trunk/modules/security/src/main/java/common/java/security/AlgorithmParameters.java Mon Oct  5 10:47:53 2009
@@ -309,6 +309,7 @@
      *
      * @return a printable representation for this {@code AlgorithmParameters}.
      */
+    @Override
     public final String toString() {
         if (!initialized) {
             return null;

Modified: harmony/enhanced/classlib/trunk/modules/security/src/main/java/common/java/security/AllPermission.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/security/src/main/java/common/java/security/AllPermission.java?rev=821750&r1=821749&r2=821750&view=diff
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/security/src/main/java/common/java/security/AllPermission.java (original)
+++ harmony/enhanced/classlib/trunk/modules/security/src/main/java/common/java/security/AllPermission.java Mon Oct  5 10:47:53 2009
@@ -71,6 +71,7 @@
      *         AllPermission}, otherwise {@code false}.
      * @see #hashCode
      */
+    @Override
     public boolean equals(Object obj) {
         return (obj instanceof AllPermission);
     }
@@ -84,6 +85,7 @@
      * @see Object#equals(Object)
      * @see AllPermission#equals(Object)
      */
+    @Override
     public int hashCode() {
         return 1;
     }
@@ -95,6 +97,7 @@
      *
      * @return the actions associated with this {@code AllPermission}.
      */
+    @Override
     public String getActions() {
         return ALL_ACTIONS;
     }
@@ -107,6 +110,7 @@
      * @param permission
      *            the permission to check.
      */
+    @Override
     public boolean implies(Permission permission) {
         return true;
     }
@@ -117,6 +121,7 @@
      *
      * @return a new {@code PermissionCollection}.
      */
+    @Override
     public PermissionCollection newPermissionCollection() {
         return new AllPermissionCollection();
     }

Modified: harmony/enhanced/classlib/trunk/modules/security/src/main/java/common/java/security/AllPermissionCollection.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/security/src/main/java/common/java/security/AllPermissionCollection.java?rev=821750&r1=821749&r2=821750&view=diff
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/security/src/main/java/common/java/security/AllPermissionCollection.java (original)
+++ harmony/enhanced/classlib/trunk/modules/security/src/main/java/common/java/security/AllPermissionCollection.java Mon Oct  5 10:47:53 2009
@@ -46,6 +46,7 @@
     /**
      * Adds an {@code AllPermission} to the collection.
      */
+    @Override
     public void add(Permission permission) {
         if (isReadOnly()) {
             throw new SecurityException(Messages.getString("security.15")); //$NON-NLS-1$
@@ -60,6 +61,7 @@
     /**
      * Returns the enumeration of the collection.
      */
+    @Override
     public Enumeration<Permission> elements() {
         return new SingletonEnumeration<Permission>(all);
     }
@@ -74,6 +76,7 @@
 
         /**
          * Constructor taking the single element.
+         * @param single the element
          */
         public SingletonEnumeration(E single) {
             element = single;
@@ -108,6 +111,7 @@
      * @param permission
      *            the permission to check.
      */
+    @Override
     public boolean implies(Permission permission) {
         return all != null;
     }

Modified: harmony/enhanced/classlib/trunk/modules/security/src/main/java/common/java/security/BasicPermission.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/security/src/main/java/common/java/security/BasicPermission.java?rev=821750&r1=821749&r2=821750&view=diff
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/security/src/main/java/common/java/security/BasicPermission.java (original)
+++ harmony/enhanced/classlib/trunk/modules/security/src/main/java/common/java/security/BasicPermission.java Mon Oct  5 10:47:53 2009
@@ -104,6 +104,7 @@
      * @return {@code true} if the specified object is equal to this {@code
      *         BasicPermission}, otherwise {@code false}.
      */
+    @Override
     public boolean equals(Object obj) {
         if (obj == this) {
             return true;
@@ -124,6 +125,7 @@
      * @see Object#equals(Object)
      * @see BasicPermission#equals(Object)
      */
+    @Override
     public int hashCode() {
         return getName().hashCode();
     }
@@ -134,6 +136,7 @@
      *
      * @return an empty string.
      */
+    @Override
     public String getActions() {
         return ""; //$NON-NLS-1$
     }
@@ -146,6 +149,7 @@
      * @return {@code true} if the specified permission is implied by this
      *         permission, {@code false} otherwise.
      */
+    @Override
     public boolean implies(Permission permission) {
         if (permission != null && permission.getClass() == this.getClass()) {
             return nameImplies(getName(), permission.getName());
@@ -195,6 +199,7 @@
      * @return an empty {@link PermissionCollection} for holding permissions.
      * @see BasicPermissionCollection
      */
+    @Override
     public PermissionCollection newPermissionCollection() {
         return new BasicPermissionCollection();
     }

Modified: harmony/enhanced/classlib/trunk/modules/security/src/main/java/common/java/security/BasicPermissionCollection.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/security/src/main/java/common/java/security/BasicPermissionCollection.java?rev=821750&r1=821749&r2=821750&view=diff
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/security/src/main/java/common/java/security/BasicPermissionCollection.java (original)
+++ harmony/enhanced/classlib/trunk/modules/security/src/main/java/common/java/security/BasicPermissionCollection.java Mon Oct  5 10:47:53 2009
@@ -62,6 +62,7 @@
      * 
      * @see java.security.PermissionCollection#add(java.security.Permission)
      */
+    @Override
     public void add(Permission permission) {
         if (isReadOnly()) {
             throw new SecurityException(Messages.getString("security.15")); //$NON-NLS-1$
@@ -98,6 +99,7 @@
     /**
      * Returns enumeration of contained elements.
      */
+    @Override
     public Enumeration<Permission> elements() {
         return Collections.enumeration(items.values());
     }
@@ -111,6 +113,7 @@
      *            the permission to check.
      * @see Permission
      */
+    @Override
     public boolean implies(Permission permission) {
         if (permission == null || permission.getClass() != permClass) {
             return false;

Modified: harmony/enhanced/classlib/trunk/modules/security/src/main/java/common/java/security/CodeSigner.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/security/src/main/java/common/java/security/CodeSigner.java?rev=821750&r1=821749&r2=821750&view=diff
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/security/src/main/java/common/java/security/CodeSigner.java (original)
+++ harmony/enhanced/classlib/trunk/modules/security/src/main/java/common/java/security/CodeSigner.java Mon Oct  5 10:47:53 2009
@@ -67,6 +67,7 @@
      * @return {@code true} if the specified object is equal to this {@code
      *         CodeSigner}, otherwise {@code false}.
      */
+    @Override
     public boolean equals(Object obj) {
         if (obj == this) {
             return true;
@@ -110,6 +111,7 @@
      * @see Object#equals(Object)
      * @see CodeSigner#equals(Object)
      */
+    @Override
     public int hashCode() {
         if (hash == 0) {
             hash = signerCertPath.hashCode()
@@ -125,6 +127,7 @@
      *
      * @return a printable representation for this {@code CodeSigner}.
      */
+    @Override
     public String toString() {
         // There is no any special reason for '256' here, it's taken abruptly
         StringBuilder buf = new StringBuilder(256);

Modified: harmony/enhanced/classlib/trunk/modules/security/src/main/java/common/java/security/CodeSource.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/security/src/main/java/common/java/security/CodeSource.java?rev=821750&r1=821749&r2=821750&view=diff
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/security/src/main/java/common/java/security/CodeSource.java (original)
+++ harmony/enhanced/classlib/trunk/modules/security/src/main/java/common/java/security/CodeSource.java Mon Oct  5 10:47:53 2009
@@ -118,6 +118,7 @@
      * @return {@code true} if the specified object is equal to this {@code
      *         CodeSource}, otherwise {@code false}.
      */
+    @Override
     public boolean equals(Object obj) {
         if (obj == this) {
             return true;
@@ -313,6 +314,7 @@
      * @see Object#equals(Object)
      * @see CodeSource#equals(Object)
      */
+    @Override
     public int hashCode() {
         //
         // hashCode() is undocumented there. Should we also use certs[i] to
@@ -539,6 +541,7 @@
      *
      * @return a printable representation for this {@code CodeSource}.
      */
+    @Override
     public String toString() {
         StringBuilder buf = new StringBuilder();
         buf.append("CodeSource, url="); //$NON-NLS-1$

Modified: harmony/enhanced/classlib/trunk/modules/security/src/main/java/common/java/security/DigestInputStream.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/security/src/main/java/common/java/security/DigestInputStream.java?rev=821750&r1=821749&r2=821750&view=diff
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/security/src/main/java/common/java/security/DigestInputStream.java (original)
+++ harmony/enhanced/classlib/trunk/modules/security/src/main/java/common/java/security/DigestInputStream.java Mon Oct  5 10:47:53 2009
@@ -78,6 +78,7 @@
      * @throws IOException
      *             if reading the source stream causes an {@code IOException}.
      */
+    @Override
     public int read() throws IOException {
         // read the next byte
         int byteRead = in.read();
@@ -110,6 +111,7 @@
      * @throws IOException
      *             if reading the source stream causes an {@code IOException}
      */
+    @Override
     public int read(byte[] b, int off, int len) throws IOException {
         // read next up to len bytes
         int bytesRead = in.read(b, off, len);
@@ -141,6 +143,7 @@
      *
      * @return a printable representation for this {@code DigestInputStream}.
      */
+    @Override
     public String toString() {
         return super.toString() + ", " + digest.toString() + //$NON-NLS-1$
             (isOn ? ", is on" : ", is off"); //$NON-NLS-1$ //$NON-NLS-2$

Modified: harmony/enhanced/classlib/trunk/modules/security/src/main/java/common/java/security/DigestOutputStream.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/security/src/main/java/common/java/security/DigestOutputStream.java?rev=821750&r1=821749&r2=821750&view=diff
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/security/src/main/java/common/java/security/DigestOutputStream.java (original)
+++ harmony/enhanced/classlib/trunk/modules/security/src/main/java/common/java/security/DigestOutputStream.java Mon Oct  5 10:47:53 2009
@@ -77,6 +77,7 @@
      * @throws IOException
      *             if writing to the stream causes a {@code IOException}
      */
+    @Override
     public void write(int b) throws IOException {
         // update digest only if digest functionality is on
         if (isOn) {
@@ -99,6 +100,7 @@
      * @throws IOException
      *             if writing to the stream causes an {@code IOException}.
      */
+    @Override
     public void write(byte[] b, int off, int len) throws IOException {
         // update digest only if digest functionality is on
         if (isOn) {
@@ -126,6 +128,7 @@
      *
      * @return a printable representation for this {@code DigestOutputStream}.
      */
+    @Override
     public String toString() {
         return super.toString() + ", " + digest.toString() + //$NON-NLS-1$
             (isOn ? ", is on" : ", is off"); //$NON-NLS-1$ //$NON-NLS-2$

Modified: harmony/enhanced/classlib/trunk/modules/security/src/main/java/common/java/security/Identity.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/security/src/main/java/common/java/security/Identity.java?rev=821750&r1=821749&r2=821750&view=diff
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/security/src/main/java/common/java/security/Identity.java (original)
+++ harmony/enhanced/classlib/trunk/modules/security/src/main/java/common/java/security/Identity.java Mon Oct  5 10:47:53 2009
@@ -344,6 +344,7 @@
      * @return {@code true} if the specified object is equal to this {@code
      *         Identity}, otherwise {@code false}.
      */
+    @Override
     public final boolean equals(Object obj) {
         if (this == obj) {
             return true;
@@ -383,6 +384,7 @@
      * @see Object#equals(Object)
      * @see Identity#equals(Object)
      */
+    @Override
     public int hashCode() {
         int hash = 0;
         if (name != null) {
@@ -410,14 +412,16 @@
      *             if a {@code SecurityManager} is installed and the caller does
      *             not have permission to invoke this method.
      */
+    @Override
+    @SuppressWarnings("nls")
     public String toString() {
         SecurityManager sm = System.getSecurityManager();
         if (sm != null) {
-            sm.checkSecurityAccess("printIdentity"); //$NON-NLS-1$
+            sm.checkSecurityAccess("printIdentity");
         }
-        String s = (this.name == null? "" : this.name);
+        String s = (this.name == null ? "" : this.name);
         if (scope != null) {
-            s += " [" + scope.getName() + "]"; //$NON-NLS-1$ //$NON-NLS-2$
+            s += " [" + scope.getName() + "]";
         }
         return s;
     }

Modified: harmony/enhanced/classlib/trunk/modules/security/src/main/java/common/java/security/IdentityScope.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/security/src/main/java/common/java/security/IdentityScope.java?rev=821750&r1=821749&r2=821750&view=diff
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/security/src/main/java/common/java/security/IdentityScope.java (original)
+++ harmony/enhanced/classlib/trunk/modules/security/src/main/java/common/java/security/IdentityScope.java Mon Oct  5 10:47:53 2009
@@ -194,6 +194,7 @@
      *
      * @return a printable representation for this {@code IdentityScope}.
      */
+    @Override
     public String toString() {
         return new StringBuilder(super.toString())
                 .append("[").append(size()).append("]").toString(); //$NON-NLS-1$ //$NON-NLS-2$

Modified: harmony/enhanced/classlib/trunk/modules/security/src/main/java/common/java/security/KeyFactory.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/security/src/main/java/common/java/security/KeyFactory.java?rev=821750&r1=821749&r2=821750&view=diff
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/security/src/main/java/common/java/security/KeyFactory.java (original)
+++ harmony/enhanced/classlib/trunk/modules/security/src/main/java/common/java/security/KeyFactory.java Mon Oct  5 10:47:53 2009
@@ -104,14 +104,15 @@
      * @throws IllegalArgumentException
      *             if {@code provider} is {@code null} or empty.
      */
+    @SuppressWarnings("nls")
     public static KeyFactory getInstance(String algorithm, String provider)
                                 throws NoSuchAlgorithmException, NoSuchProviderException {
         if ((provider == null) || (provider.length() == 0)) {
-            throw new IllegalArgumentException(Messages.getString("security.02")); //$NON-NLS-1$
+            throw new IllegalArgumentException(Messages.getString("security.02"));
         }
         Provider p = Security.getProvider(provider);
         if (p == null) {
-            throw new NoSuchProviderException(Messages.getString("security.03", provider));  //$NON-NLS-1$ //$NON-NLS-2$
+            throw new NoSuchProviderException(Messages.getString("security.03", provider));
         }
         return getInstance(algorithm, p);    
     }
@@ -196,6 +197,9 @@
     /**
      * Returns the key specification for the specified key.
      * 
+     * @param <T>
+     *            The key type
+     * 
      * @param key
      *            the key from which the specification is requested.
      * @param keySpec

Modified: harmony/enhanced/classlib/trunk/modules/security/src/main/java/common/java/security/KeyPairGenerator.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/security/src/main/java/common/java/security/KeyPairGenerator.java?rev=821750&r1=821749&r2=821750&view=diff
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/security/src/main/java/common/java/security/KeyPairGenerator.java (original)
+++ harmony/enhanced/classlib/trunk/modules/security/src/main/java/common/java/security/KeyPairGenerator.java Mon Oct  5 10:47:53 2009
@@ -92,11 +92,10 @@
                 result.algorithm = algorithm;
                 result.provider = engine.provider;
                 return result;
-            } else {
-                result = new KeyPairGeneratorImpl((KeyPairGeneratorSpi) engine.spi,
-                        engine.provider, algorithm);
-                return result;
             }
+            result = new KeyPairGeneratorImpl((KeyPairGeneratorSpi) engine.spi,
+                    engine.provider, algorithm);
+            return result;
         }
     }
 
@@ -158,11 +157,10 @@
                 result.algorithm = algorithm;
                 result.provider = provider;
                 return result;
-            } else {
-                result = new KeyPairGeneratorImpl((KeyPairGeneratorSpi) engine.spi,
-                        provider, algorithm);
-                return result;
             }
+            result = new KeyPairGeneratorImpl((KeyPairGeneratorSpi) engine.spi,
+                    provider, algorithm);
+            return result;
         }
     }
 
@@ -222,6 +220,7 @@
      *
      * @return a new unique {@code KeyPair} each time this method is called
      */
+    @Override
     public KeyPair generateKeyPair() {
         return null;
     }
@@ -235,6 +234,7 @@
      * @param random
      *            the source of randomness
      */
+    @Override
     public void initialize(int keysize, SecureRandom random) {
     }
 
@@ -249,6 +249,7 @@
      * @throws InvalidAlgorithmParameterException
      *             if the specified parameters are not supported
      */
+    @Override
     public void initialize(AlgorithmParameterSpec param, SecureRandom random)
             throws InvalidAlgorithmParameterException {
     }
@@ -276,18 +277,21 @@
 
         // implementation of initialize(int keysize, SecureRandom random)
         // using corresponding spi initialize() method
+        @Override
         public void initialize(int keysize, SecureRandom random) {
             spiImpl.initialize(keysize, random);
         }
 
         // implementation of generateKeyPair()
         // using corresponding spi generateKeyPair() method
+        @Override
         public KeyPair generateKeyPair() {
             return spiImpl.generateKeyPair();
         }
 
         // implementation of initialize(int keysize, SecureRandom random)
         // using corresponding spi initialize() method
+        @Override
         public void initialize(AlgorithmParameterSpec param, SecureRandom random)
                 throws InvalidAlgorithmParameterException {
             spiImpl.initialize(param, random);

Modified: harmony/enhanced/classlib/trunk/modules/security/src/main/java/common/java/security/KeyStore.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/security/src/main/java/common/java/security/KeyStore.java?rev=821750&r1=821749&r2=821750&view=diff
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/security/src/main/java/common/java/security/KeyStore.java (original)
+++ harmony/enhanced/classlib/trunk/modules/security/src/main/java/common/java/security/KeyStore.java Mon Oct  5 10:47:53 2009
@@ -983,6 +983,7 @@
             // 
             // Result KeyStore object is returned.
             //
+            @Override
             public synchronized KeyStore getKeyStore() throws KeyStoreException {
                 // If KeyStore was created but in final block some exception was
                 // thrown
@@ -1059,6 +1060,7 @@
             // Return: ProtectionParameter to get Entry which was saved in
             // KeyStore with defined alias
             //
+            @Override
             public synchronized ProtectionParameter getProtectionParameter(
                     String alias) throws KeyStoreException {
                 if (alias == null) {
@@ -1073,8 +1075,6 @@
 
         /*
          * Implementation of LoadStoreParameter interface
-         * 
-         * @author Vera Petrashkova
          */
         private static class TmpLSParameter implements LoadStoreParameter {
 
@@ -1083,6 +1083,7 @@
 
             /**
              * Creates TmpLoadStoreParameter object
+             * @param protPar protection parameter
              */
             public TmpLSParameter(ProtectionParameter protPar) {
                 this.protPar = protPar;
@@ -1336,6 +1337,7 @@
          *
          * @return a printable representation for this {@code PrivateKeyEntry}.
          */
+        @Override
         public String toString() {
             StringBuilder sb = new StringBuilder(
                     "PrivateKeyEntry: number of elements in certificate chain is "); //$NON-NLS-1$
@@ -1390,6 +1392,7 @@
          * @return a printable representation for this {@code
          *         SecretKeyEntry}.
          */
+        @Override
         public String toString() {
             StringBuilder sb = new StringBuilder("SecretKeyEntry: algorithm - "); //$NON-NLS-1$
             sb.append(secretKey.getAlgorithm());
@@ -1438,6 +1441,7 @@
          * @return a printable representation for this {@code
          *         TrustedCertificateEntry}.
          */
+        @Override
         public String toString() {
             return "Trusted certificate entry:\n" + trustCertificate; //$NON-NLS-1$
         }

Modified: harmony/enhanced/classlib/trunk/modules/security/src/main/java/common/java/security/MessageDigest.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/security/src/main/java/common/java/security/MessageDigest.java?rev=821750&r1=821749&r2=821750&view=diff
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/security/src/main/java/common/java/security/MessageDigest.java (original)
+++ harmony/enhanced/classlib/trunk/modules/security/src/main/java/common/java/security/MessageDigest.java Mon Oct  5 10:47:53 2009
@@ -80,11 +80,9 @@
                 result.algorithm = algorithm;
                 result.provider = engine.provider;
                 return result;
-            } else {
-                result = new MessageDigestImpl((MessageDigestSpi) engine.spi,
-                        engine.provider, algorithm);
-                return result;
             }
+            return new MessageDigestImpl((MessageDigestSpi) engine.spi,
+                    engine.provider, algorithm);
         }
     }
 
@@ -151,11 +149,10 @@
                 result.algorithm = algorithm;
                 result.provider = provider;
                 return result;
-            } else {
-                result = new MessageDigestImpl((MessageDigestSpi) engine.spi,
-                        provider, algorithm);
-                return result;
             }
+            result = new MessageDigestImpl((MessageDigestSpi) engine.spi,
+                    provider, algorithm);
+            return result;
         }
     }
 
@@ -280,6 +277,7 @@
      * 
      * @return a printable representation for this {@code MessageDigest}
      */
+    @Override
     public String toString() {
         return "MESSAGE DIGEST " + algorithm; //$NON-NLS-1$
     }
@@ -347,12 +345,12 @@
         }
     }
 
+    @Override
     public Object clone() throws CloneNotSupportedException {
         if (this instanceof Cloneable) {
             return super.clone();
-        } else {
-            throw new CloneNotSupportedException();
         }
+        throw new CloneNotSupportedException();
     }
 
     /**
@@ -384,38 +382,44 @@
         }
 
         // engineReset() implementation
+        @Override
         protected void engineReset() {
             spiImpl.engineReset();
         }
 
         // engineDigest() implementation
+        @Override
         protected byte[] engineDigest() {
             return spiImpl.engineDigest();
         }
 
         // engineGetDigestLength() implementation
+        @Override
         protected int engineGetDigestLength() {
             return spiImpl.engineGetDigestLength();
         }
 
         // engineUpdate() implementation
+        @Override
         protected void engineUpdate(byte arg0) {
             spiImpl.engineUpdate(arg0);
         }
 
         // engineUpdate() implementation
+        @Override
         protected void engineUpdate(byte[] arg0, int arg1, int arg2) {
             spiImpl.engineUpdate(arg0, arg1, arg2);
         }
 
         // Returns a clone if the spiImpl is cloneable
+        @Override
         public Object clone() throws CloneNotSupportedException {
             if (spiImpl instanceof Cloneable) {
                 MessageDigestSpi spi = (MessageDigestSpi) spiImpl.clone();
                 return new MessageDigestImpl(spi, getProvider(), getAlgorithm());
-            } else {
-                throw new CloneNotSupportedException();
             }
+            
+            throw new CloneNotSupportedException();
         }
     }
 }

Modified: harmony/enhanced/classlib/trunk/modules/security/src/main/java/common/java/security/MessageDigestSpi.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/security/src/main/java/common/java/security/MessageDigestSpi.java?rev=821750&r1=821749&r2=821750&view=diff
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/security/src/main/java/common/java/security/MessageDigestSpi.java (original)
+++ harmony/enhanced/classlib/trunk/modules/security/src/main/java/common/java/security/MessageDigestSpi.java Mon Oct  5 10:47:53 2009
@@ -148,6 +148,7 @@
      */
     protected abstract void engineReset();
     
+    @Override
     public Object clone() throws CloneNotSupportedException {
         return super.clone();
     }

Modified: harmony/enhanced/classlib/trunk/modules/security/src/main/java/common/java/security/Permission.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/security/src/main/java/common/java/security/Permission.java?rev=821750&r1=821749&r2=821750&view=diff
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/security/src/main/java/common/java/security/Permission.java (original)
+++ harmony/enhanced/classlib/trunk/modules/security/src/main/java/common/java/security/Permission.java Mon Oct  5 10:47:53 2009
@@ -45,6 +45,7 @@
      * @return {@code true} if the specified object is equal to this {@code
      *         Permission}, otherwise {@code false}.
      */
+    @Override
     public abstract boolean equals(Object obj);
 
     /**
@@ -56,6 +57,7 @@
      * @see Object#equals(Object)
      * @see Permission#equals(Object)
      */
+    @Override
     public abstract int hashCode();
 
     /**
@@ -149,6 +151,7 @@
      *
      * @return a printable representation for this {@code Permission}.
      */
+    @Override
     public String toString() {
         String actions = getActions();
         actions = (actions == null || actions.length() == 0) ? "" : " " //$NON-NLS-1$ //$NON-NLS-2$

Modified: harmony/enhanced/classlib/trunk/modules/security/src/main/java/common/java/security/PermissionCollection.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/security/src/main/java/common/java/security/PermissionCollection.java?rev=821750&r1=821749&r2=821750&view=diff
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/security/src/main/java/common/java/security/PermissionCollection.java (original)
+++ harmony/enhanced/classlib/trunk/modules/security/src/main/java/common/java/security/PermissionCollection.java Mon Oct  5 10:47:53 2009
@@ -95,9 +95,10 @@
      * 
      * @return a printable representation for this {@code PermissionCollection}.
      */
+    @Override
     public String toString() {
-        List elist = new ArrayList(100);
-        Enumeration elenum = elements();
+        List<String> elist = new ArrayList<String>(100);
+        Enumeration<Permission> elenum = elements();
         String superStr = super.toString();
         int totalLength = superStr.length() + 5;
         if (elenum != null) {

Modified: harmony/enhanced/classlib/trunk/modules/security/src/main/java/common/java/security/Policy.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/security/src/main/java/common/java/security/Policy.java?rev=821750&r1=821749&r2=821750&view=diff
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/security/src/main/java/common/java/security/Policy.java (original)
+++ harmony/enhanced/classlib/trunk/modules/security/src/main/java/common/java/security/Policy.java Mon Oct  5 10:47:53 2009
@@ -114,8 +114,8 @@
             if (total == null) {
                 total = inherent;
             } else if (inherent != null) {
-                for (Enumeration en = inherent.elements(); en.hasMoreElements();) {
-                    total.add((Permission)en.nextElement());
+                for (Enumeration<Permission> en = inherent.elements(); en.hasMoreElements();) {
+                    total.add(en.nextElement());
                 }
             }
             if (total != null && total.implies(permission)) {
@@ -152,7 +152,7 @@
      // In case of any error, including undefined provider name, 
      // returns new instance of org.apache.harmony.security.FilePolicy provider. 
     private static Policy getDefaultProvider() {
-        final String defaultClass = (String) AccessController
+        final String defaultClass = AccessController
                 .doPrivileged(new PolicyUtils.SecurityPropertyAccessor(
                         POLICY_PROVIDER));
         if (defaultClass == null) {

Modified: harmony/enhanced/classlib/trunk/modules/security/src/main/java/common/java/security/PrivilegedActionException.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/security/src/main/java/common/java/security/PrivilegedActionException.java?rev=821750&r1=821749&r2=821750&view=diff
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/security/src/main/java/common/java/security/PrivilegedActionException.java (original)
+++ harmony/enhanced/classlib/trunk/modules/security/src/main/java/common/java/security/PrivilegedActionException.java Mon Oct  5 10:47:53 2009
@@ -71,6 +71,7 @@
      * @return the exception that was thrown by a
      *         {@code PrivilegedExceptionAction}.
      */
+    @Override
     public Throwable getCause() {
         return exception;
     }
@@ -82,6 +83,7 @@
      * @return a printable representation for this {@code
      *         PrivilegedActionException}.
      */
+    @Override
     public String toString() {
         String s = getClass().getName();
         return exception == null ? s : s + ": " + exception; //$NON-NLS-1$

Modified: harmony/enhanced/classlib/trunk/modules/security/src/main/java/common/java/security/ProtectionDomain.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/security/src/main/java/common/java/security/ProtectionDomain.java?rev=821750&r1=821749&r2=821750&view=diff
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/security/src/main/java/common/java/security/ProtectionDomain.java (original)
+++ harmony/enhanced/classlib/trunk/modules/security/src/main/java/common/java/security/ProtectionDomain.java Mon Oct  5 10:47:53 2009
@@ -211,6 +211,7 @@
      *
      * @return a printable representation for this {@code ProtectionDomain}.
      */
+    @Override
     public String toString() {
         StringBuilder buf = new StringBuilder(200);
         buf.append("ProtectionDomain\n"); //$NON-NLS-1$

Modified: harmony/enhanced/classlib/trunk/modules/security/src/main/java/common/java/security/Provider.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/security/src/main/java/common/java/security/Provider.java?rev=821750&r1=821749&r2=821750&view=diff
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/security/src/main/java/common/java/security/Provider.java (original)
+++ harmony/enhanced/classlib/trunk/modules/security/src/main/java/common/java/security/Provider.java Mon Oct  5 10:47:53 2009
@@ -143,6 +143,7 @@
      *
      * @return a printable representation for this {@code Provider}.
      */
+    @Override
     public String toString() {
         return name + " version " + version; //$NON-NLS-1$
     }
@@ -160,6 +161,7 @@
      *             if a {@code SecurityManager} is installed and the caller does
      *             not have permission to invoke this method.
      */
+    @Override
     public synchronized void clear() {
         SecurityManager sm = System.getSecurityManager();
         if (sm != null) {
@@ -189,6 +191,7 @@
         servicesChanged();
     }
 
+    @Override
     public synchronized void load(InputStream inStream) throws IOException {
         Properties tmp = new Properties();
         tmp.load(inStream);
@@ -209,6 +212,7 @@
      *             if a {@code SecurityManager} is installed and the caller does
      *             not have permission to invoke this method.
      */
+    @Override
     public synchronized void putAll(Map<?,?> t) {
 
         // Implementation note:
@@ -249,14 +253,17 @@
         }
     }
 
+    @Override
     public synchronized Set<Map.Entry<Object,Object>> entrySet() {
         return Collections.unmodifiableSet(super.entrySet());
     }
 
+    @Override
     public Set<Object> keySet() {
         return Collections.unmodifiableSet(super.keySet());
     }
 
+    @Override
     public Collection<Object> values() {
         return Collections.unmodifiableCollection(super.values());
     }
@@ -280,6 +287,7 @@
      *             if a {@code SecurityManager} is installed and the caller does
      *             not have permission to invoke this method.
      */
+    @Override
     public synchronized Object put(Object key, Object value) {
         SecurityManager sm = System.getSecurityManager();
         if (sm != null) {
@@ -320,6 +328,7 @@
      *             if a {@code SecurityManager} is installed and the caller does
      *             not have the permission to invoke this method.
      */
+    @Override
     public synchronized Object remove(Object key) {
         SecurityManager sm = System.getSecurityManager();
         if (sm != null) {
@@ -361,15 +370,14 @@
             alg = getPropertyIgnoreCase("Alg.Alias." + servAlg); //$NON-NLS-1$
             if (alg != null) {
                 servAlg = serv + "." + alg; //$NON-NLS-1$
-                prop = getPropertyIgnoreCase(servAlg); //$NON-NLS-1$
+                prop = getPropertyIgnoreCase(servAlg);
             }
         }
         if (prop != null) {
             if (attribute == null) {
                 return true;
-            } else {
-                return checkAttribute(servAlg, attribute, val); //$NON-NLS-1$
             }
+            return checkAttribute(servAlg, attribute, val);
         }
         return false;
     }
@@ -835,11 +843,12 @@
     // These attributes should be placed in each Provider object: 
     // Provider.id name, Provider.id version, Provider.id info, 
     // Provider.id className
+    @SuppressWarnings("nls")
     private void putProviderInfo() {
-        super.put("Provider.id name", null != name ? name : "null"); //$NON-NLS-1$
-		super.put("Provider.id version", versionString); //$NON-NLS-1$
-		super.put("Provider.id info", null != info ? info : "null"); //$NON-NLS-1$
-        super.put("Provider.id className", this.getClass().getName()); //$NON-NLS-1$
+        super.put("Provider.id name", null != name ? name : "null");
+		super.put("Provider.id version", versionString);
+		super.put("Provider.id info", null != info ? info : "null");
+        super.put("Provider.id className", this.getClass().getName());
     }
 
     // Searches for the property with the specified key in the provider
@@ -1044,27 +1053,26 @@
                     throw new NoSuchAlgorithmException(Messages.getString("security.199", //$NON-NLS-1$
                             type, algorithm), e);
                 }
-            } else {
-                if (!supportsParameter(constructorParameter)) {
-                    throw new InvalidParameterException(
-                            Messages.getString("security.12", type)); //$NON-NLS-1$
-                }
+            }
+            if (!supportsParameter(constructorParameter)) {
+                throw new InvalidParameterException(
+                        Messages.getString("security.12", type)); //$NON-NLS-1$
+            }
 
-                Class[] parameterTypes = new Class[1];
-                Object[] initargs = { constructorParameter };
-                try {
-                    if (Util.equalsIgnoreCase(type,"CertStore")) { //$NON-NLS-1$
-                        parameterTypes[0] = Class
-                                .forName("java.security.cert.CertStoreParameters"); //$NON-NLS-1$
-                    } else {
-                        parameterTypes[0] = constructorParameter.getClass();
-                    }
-                    return implementation.getConstructor(parameterTypes)
-                            .newInstance(initargs);
-                } catch (Exception e) {
-                    throw new NoSuchAlgorithmException(Messages.getString("security.199", //$NON-NLS-1$
-                            type, algorithm), e);
+            Class[] parameterTypes = new Class[1];
+            Object[] initargs = { constructorParameter };
+            try {
+                if (Util.equalsIgnoreCase(type,"CertStore")) { //$NON-NLS-1$
+                    parameterTypes[0] = Class
+                            .forName("java.security.cert.CertStoreParameters"); //$NON-NLS-1$
+                } else {
+                    parameterTypes[0] = constructorParameter.getClass();
                 }
+                return implementation.getConstructor(parameterTypes)
+                        .newInstance(initargs);
+            } catch (Exception e) {
+                throw new NoSuchAlgorithmException(Messages.getString("security.199", //$NON-NLS-1$
+                        type, algorithm), e);
             }
         }
 
@@ -1087,6 +1095,7 @@
          *
          * @return a printable representation for this {@code Service}.
          */
+        @Override
         public String toString() {
             String result = "Provider " + provider.getName() + " Service " //$NON-NLS-1$ //$NON-NLS-2$
                     + type + "." + algorithm + " " + className; //$NON-NLS-1$ //$NON-NLS-2$

Modified: harmony/enhanced/classlib/trunk/modules/security/src/main/java/common/java/security/SecureClassLoader.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/security/src/main/java/common/java/security/SecureClassLoader.java?rev=821750&r1=821749&r2=821750&view=diff
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/security/src/main/java/common/java/security/SecureClassLoader.java (original)
+++ harmony/enhanced/classlib/trunk/modules/security/src/main/java/common/java/security/SecureClassLoader.java Mon Oct  5 10:47:53 2009
@@ -28,7 +28,7 @@
 public class SecureClassLoader extends ClassLoader {
 
     // A cache of ProtectionDomains for a given CodeSource
-    private HashMap pds = new HashMap();
+    private HashMap<CodeSource, ProtectionDomain> pds = new HashMap<CodeSource, ProtectionDomain>();
 
     /**
      * Constructs a new instance of {@code SecureClassLoader}. The default
@@ -150,7 +150,7 @@
         // will have it's own ProtectionDomain, which does not look right.
         ProtectionDomain pd;
         synchronized (pds) {
-            if ((pd = (ProtectionDomain) pds.get(cs)) != null) {
+            if ((pd = pds.get(cs)) != null) {
                 return pd;
             }
             PermissionCollection perms = getPermissions(cs);

Modified: harmony/enhanced/classlib/trunk/modules/security/src/main/java/common/java/security/SecureRandom.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/security/src/main/java/common/java/security/SecureRandom.java?rev=821750&r1=821749&r2=821750&view=diff
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/security/src/main/java/common/java/security/SecureRandom.java (original)
+++ harmony/enhanced/classlib/trunk/modules/security/src/main/java/common/java/security/SecureRandom.java Mon Oct  5 10:47:53 2009
@@ -252,6 +252,7 @@
      * @param seed
      *            the new seed.
      */
+    @Override
     public void setSeed(long seed) {
         if (seed == 0) {    // skip call from Random
             return;
@@ -276,6 +277,7 @@
      * @param bytes
      *            the {@code byte[]} to be filled with random bytes.
      */
+    @Override
     public synchronized void nextBytes(byte[] bytes) {
         secureRandomSpi.engineNextBytes(bytes);
     }
@@ -289,6 +291,7 @@
      *            the range [0, 32].
      * @return an {@code int} containing the specified number of random bits.
      */
+    @Override
     protected final int next(int numBits) {
         if (numBits < 0) {
             numBits = 0;

Modified: harmony/enhanced/classlib/trunk/modules/security/src/main/java/common/java/security/Security.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/security/src/main/java/common/java/security/Security.java?rev=821750&r1=821749&r2=821750&view=diff
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/security/src/main/java/common/java/security/Security.java (original)
+++ harmony/enhanced/classlib/trunk/modules/security/src/main/java/common/java/security/Security.java Mon Oct  5 10:47:53 2009
@@ -30,6 +30,7 @@
 import java.util.Map;
 import java.util.Properties;
 import java.util.Set;
+import java.util.Map.Entry;
 
 import org.apache.harmony.security.Util;
 import org.apache.harmony.security.fortress.Engine;
@@ -362,12 +363,12 @@
             return null;
         }
         java.util.List<Provider> result = Services.getProvidersList();
-        Set keys = filter.entrySet();
-        Map.Entry entry;
-        for (Iterator it = keys.iterator(); it.hasNext();) {
-            entry = (Map.Entry) it.next();
-            String key = (String) entry.getKey();
-            String val = (String) entry.getValue();
+        Set<Entry<String, String>> keys = filter.entrySet();
+        Map.Entry<String, String> entry;
+        for (Iterator<Entry<String, String>> it = keys.iterator(); it.hasNext();) {
+            entry = it.next();
+            String key = entry.getKey();
+            String val = entry.getValue();
             String attribute = null;
             int i = key.indexOf(' ');
             int j = key.indexOf('.');
@@ -401,7 +402,7 @@
             Provider p;
             for (int k = 0; k < result.size(); k++) {
                 try {
-                    p = (Provider) result.get(k);
+                    p = result.get(k);
                 } catch (IndexOutOfBoundsException e) {
                     break;
                 }
@@ -413,9 +414,8 @@
         }
         if (result.size() > 0) {
             return result.toArray(new Provider[result.size()]);
-        } else {
-            return null;
         }
+        return null;
     }
 
     /**

Modified: harmony/enhanced/classlib/trunk/modules/security/src/main/java/common/java/security/Signature.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/security/src/main/java/common/java/security/Signature.java?rev=821750&r1=821749&r2=821750&view=diff
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/security/src/main/java/common/java/security/Signature.java (original)
+++ harmony/enhanced/classlib/trunk/modules/security/src/main/java/common/java/security/Signature.java Mon Oct  5 10:47:53 2009
@@ -515,6 +515,7 @@
      *
      * @return a printable representation for this {@code Signature}.
      */
+    @Override
     public String toString() {
         return "SIGNATURE " + algorithm + " state: " + stateToString(state); //$NON-NLS-1$ //$NON-NLS-2$
     }
@@ -594,12 +595,12 @@
         return engineGetParameter(param);
     }
 
+    @Override
     public Object clone() throws CloneNotSupportedException {
         if (this instanceof Cloneable) {
             return super.clone();
-        } else {
-            throw new CloneNotSupportedException();
         }
+        throw new CloneNotSupportedException();
     }
 
     /**
@@ -620,58 +621,66 @@
         }
 
         // engineSign() implementation
+        @Override
         protected byte[] engineSign() throws SignatureException {
             return spiImpl.engineSign();
         }
 
         //  engineUpdate() implementation
+        @Override
         protected void engineUpdate(byte arg0) throws SignatureException {
             spiImpl.engineUpdate(arg0);
         }
 
         // engineVerify() implementation
+        @Override
         protected boolean engineVerify(byte[] arg0) throws SignatureException {
             return spiImpl.engineVerify(arg0);
         }
 
         // engineUpdate() implementation
+        @Override
         protected void engineUpdate(byte[] arg0, int arg1, int arg2)
                 throws SignatureException {
             spiImpl.engineUpdate(arg0, arg1, arg2);
         }
 
         // engineInitSign() implementation
+        @Override
         protected void engineInitSign(PrivateKey arg0)
                 throws InvalidKeyException {
             spiImpl.engineInitSign(arg0);
         }
 
         // engineInitVerify() implementation
+        @Override
         protected void engineInitVerify(PublicKey arg0)
                 throws InvalidKeyException {
             spiImpl.engineInitVerify(arg0);
         }
 
         // engineGetParameter() implementation
+        @Override
         protected Object engineGetParameter(String arg0)
                 throws InvalidParameterException {
             return spiImpl.engineGetParameter(arg0);
         }
 
         // engineSetParameter() implementation
+        @Override
         protected void engineSetParameter(String arg0, Object arg1)
                 throws InvalidParameterException {
             spiImpl.engineSetParameter(arg0, arg1);
         }
 
         // Returns a clone if the spiImpl is cloneable
+        @Override
         public Object clone() throws CloneNotSupportedException {
             if (spiImpl instanceof Cloneable) {
                 SignatureSpi spi = (SignatureSpi) spiImpl.clone();
                 return new SignatureImpl(spi, getProvider(), getAlgorithm());
-            } else {
-                throw new CloneNotSupportedException();
             }
+            throw new CloneNotSupportedException();
         }
     }
 }
\ No newline at end of file

Modified: harmony/enhanced/classlib/trunk/modules/security/src/main/java/common/java/security/SignatureSpi.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/security/src/main/java/common/java/security/SignatureSpi.java?rev=821750&r1=821749&r2=821750&view=diff
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/security/src/main/java/common/java/security/SignatureSpi.java (original)
+++ harmony/enhanced/classlib/trunk/modules/security/src/main/java/common/java/security/SignatureSpi.java Mon Oct  5 10:47:53 2009
@@ -308,11 +308,11 @@
     protected abstract Object engineGetParameter(String param)
             throws InvalidParameterException;
 
+    @Override
     public Object clone() throws CloneNotSupportedException {
         if (this instanceof Cloneable) {
             return super.clone();
-        } else {
-            throw new CloneNotSupportedException();
         }
+        throw new CloneNotSupportedException();
     }
 }
\ No newline at end of file

Modified: harmony/enhanced/classlib/trunk/modules/security/src/main/java/common/java/security/Signer.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/security/src/main/java/common/java/security/Signer.java?rev=821750&r1=821749&r2=821750&view=diff
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/security/src/main/java/common/java/security/Signer.java (original)
+++ harmony/enhanced/classlib/trunk/modules/security/src/main/java/common/java/security/Signer.java Mon Oct  5 10:47:53 2009
@@ -136,6 +136,7 @@
      *
      * @return a printable representation for this {@code Signer}.
      */
+    @Override
     public String toString() {
         String s = "[Signer]" + getName(); //$NON-NLS-1$
         if (getScope() != null) {

Modified: harmony/enhanced/classlib/trunk/modules/security/src/main/java/common/java/security/Timestamp.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/security/src/main/java/common/java/security/Timestamp.java?rev=821750&r1=821749&r2=821750&view=diff
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/security/src/main/java/common/java/security/Timestamp.java (original)
+++ harmony/enhanced/classlib/trunk/modules/security/src/main/java/common/java/security/Timestamp.java Mon Oct  5 10:47:53 2009
@@ -76,6 +76,7 @@
      *         Timestamp}, otherwise {@code false}.
      * @see #hashCode
      */
+    @Override
     public boolean equals(Object obj) {
         if (obj == this) {
             return true;
@@ -115,6 +116,7 @@
      * @see Object#equals(Object)
      * @see Timestamp#equals(Object)
      */
+    @Override
     public int hashCode() {
         if (hash == 0) {
             hash = timestamp.hashCode() ^ signerCertPath.hashCode();
@@ -128,6 +130,7 @@
      *
      * @return a printable representation for this {@code Timestamp}.
      */
+    @Override
     public String toString() {
         StringBuilder buf = new StringBuilder(256);
         // Dump only the first certificate

Modified: harmony/enhanced/classlib/trunk/modules/security/src/main/java/common/java/security/UnresolvedPermission.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/security/src/main/java/common/java/security/UnresolvedPermission.java?rev=821750&r1=821749&r2=821750&view=diff
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/security/src/main/java/common/java/security/UnresolvedPermission.java (original)
+++ harmony/enhanced/classlib/trunk/modules/security/src/main/java/common/java/security/UnresolvedPermission.java Mon Oct  5 10:47:53 2009
@@ -118,6 +118,7 @@
      * @return {@code true} if the specified object is equal to this {@code
      *         UnresolvedPermission}, otherwise {@code false}.
      */
+    @Override
     public boolean equals(Object obj) {
         if (obj == this) {
             return true;
@@ -200,6 +201,7 @@
      * @see Object#equals(Object)
      * @see UnresolvedPermission#equals(Object)
      */
+    @Override
     public int hashCode() {
         if (hash == 0) {
             hash = getName().hashCode();
@@ -220,6 +222,7 @@
      *
      * @return an empty string, indicating that there are no actions.
      */
+    @Override
     public String getActions() {
         return ""; //$NON-NLS-1$
     }
@@ -287,6 +290,7 @@
      *            the permission to check.
      * @return always {@code false}
      */
+    @Override
     public boolean implies(Permission permission) {
         return false;
     }
@@ -298,6 +302,7 @@
      *
      * @return a printable representation for this {@code UnresolvedPermission}.
      */
+    @Override
     public String toString() {
         return "(unresolved " + type + " " + name + " " //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
             + actions + ")"; //$NON-NLS-1$
@@ -310,6 +315,7 @@
      * @return a new PermissionCollection for holding {@code
      *         UnresolvedPermission} objects.
      */
+    @Override
     public PermissionCollection newPermissionCollection() {
         return new UnresolvedPermissionCollection();
     }



Mime
View raw message