Commit 28839b70 by Casey Marshall Committed by Andreas Tobler

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
parent ce521a9c
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.
2004-08-29 Mark Wielaard <mark@klomp.org>
* java/util/Arrays.java
......
......@@ -51,9 +51,6 @@ 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());
result.provider = this.getProvider();
......
......@@ -49,9 +49,6 @@ final class DummyMessageDigest extends MessageDigest
public Object clone() throws CloneNotSupportedException
{
if (!(mdSpi instanceof Cloneable))
throw new CloneNotSupportedException();
MessageDigest result = new DummyMessageDigest
((MessageDigestSpi) mdSpi.clone(), this.getAlgorithm());
result.provider = this.getProvider();
......
......@@ -49,9 +49,6 @@ final class DummySignature extends Signature
public Object clone() throws CloneNotSupportedException
{
if (!(sigSpi instanceof Cloneable))
throw new CloneNotSupportedException();
Signature result = new DummySignature
((SignatureSpi) sigSpi.clone(), this.getAlgorithm());
result.provider = this.getProvider();
......
......@@ -383,10 +383,7 @@ public abstract class MessageDigest extends MessageDigestSpi
*/
public Object clone() throws CloneNotSupportedException
{
if (this instanceof Cloneable)
return super.clone();
else
throw new CloneNotSupportedException();
}
private String digestToString()
......
......@@ -150,9 +150,6 @@ public abstract class MessageDigestSpi
*/
public Object clone() throws CloneNotSupportedException
{
if (this instanceof Cloneable)
return super.clone();
else
throw new CloneNotSupportedException();
}
}
......@@ -627,6 +627,6 @@ public abstract class Signature extends SignatureSpi
*/
public Object clone() throws CloneNotSupportedException
{
throw new CloneNotSupportedException();
return super.clone();
}
}
......@@ -297,6 +297,6 @@ public abstract class SignatureSpi
*/
public Object clone() throws CloneNotSupportedException
{
throw new CloneNotSupportedException();
return super.clone();
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment