7081817: test/sun/security/provider/certpath/X509CertPath/IllegalCertiticates.java failing
Reviewed-by: alanb, weijun
This commit is contained in:
parent
a0f3a629c5
commit
243a5f3b79
@ -105,7 +105,13 @@ public class X509CertPath extends CertPath {
|
|||||||
super("X.509");
|
super("X.509");
|
||||||
|
|
||||||
// Ensure that the List contains only X509Certificates
|
// Ensure that the List contains only X509Certificates
|
||||||
for (Certificate obj : certs) {
|
//
|
||||||
|
// Note; The certs parameter is not necessarily to be of Certificate
|
||||||
|
// for some old code. For compatibility, to make sure the exception
|
||||||
|
// is CertificateException, rather than ClassCastException, please
|
||||||
|
// don't use
|
||||||
|
// for (Certificate obj : certs)
|
||||||
|
for (Object obj : certs) {
|
||||||
if (obj instanceof X509Certificate == false) {
|
if (obj instanceof X509Certificate == false) {
|
||||||
throw new CertificateException
|
throw new CertificateException
|
||||||
("List is not all X509Certificates: "
|
("List is not all X509Certificates: "
|
||||||
|
Loading…
x
Reference in New Issue
Block a user