diff -r 3c7eda3ab2f5 -r 0bb1999251f8 jdk/src/share/classes/com/sun/crypto/provider/DHPublicKey.java --- a/jdk/src/share/classes/com/sun/crypto/provider/DHPublicKey.java Mon Aug 15 12:56:01 2011 -0700 +++ b/jdk/src/share/classes/com/sun/crypto/provider/DHPublicKey.java Mon Aug 15 11:48:20 2011 -0700 @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -29,10 +29,8 @@ import java.math.BigInteger; import java.security.KeyRep; import java.security.InvalidKeyException; -import java.security.InvalidAlgorithmParameterException; import java.security.ProviderException; import java.security.PublicKey; -import javax.crypto.*; import javax.crypto.spec.DHParameterSpec; import sun.security.util.*; @@ -174,7 +172,7 @@ throw new InvalidKeyException("Excess key data"); } - this.encodedKey = (byte[])encodedKey.clone(); + this.encodedKey = encodedKey.clone(); } catch (NumberFormatException e) { throw new InvalidKeyException("Private-value length too big"); @@ -237,7 +235,7 @@ return null; } } - return (byte[])this.encodedKey.clone(); + return this.encodedKey.clone(); } /**