DummyKeyPairGenerator.java (clone): Removed useless instanceof check.

2004-08-30  Casey Marshall  <csm@gnu.org>

        * java/security/DummyKeyPairGenerator.java (clone): Removed
        useless instanceof check.
        * java/security/DummyMessageDigest.java (clone): Likewise.
        * java/security/DummySignature.java (clone): Likewise.
        * java/security/MessageDigest.java (clone): Remove useless
        instanceof check.
        * java/security/MessageDigestSpi.java (clone): Likewise.
        * java/security/Signature.java (clone): Provide meaningful
        implementation.
        * java/security/SignatureSpi.java (clone): Likewise.

From-SVN: r86755
This commit is contained in:
Casey Marshall 2004-08-30 10:25:38 +00:00 committed by Andreas Tobler
parent ce521a9c85
commit 28839b70d0
8 changed files with 52 additions and 54 deletions

View file

@ -51,11 +51,8 @@ final class DummyKeyPairGenerator extends KeyPairGenerator
public Object clone() throws CloneNotSupportedException
{
if (!(kpgSpi instanceof Cloneable))
throw new CloneNotSupportedException();
KeyPairGenerator result = new DummyKeyPairGenerator
((KeyPairGeneratorSpi) kpgSpi.clone(), this.getAlgorithm());
((KeyPairGeneratorSpi) kpgSpi.clone(), this.getAlgorithm());
result.provider = this.getProvider();
return result;
}