jdk/src/share/classes/sun/net/www/protocol/https/AbstractDelegateHttpsURLConnection.java
changeset 10596 39b3a979e600
parent 5506 202f599c92aa
child 16499 88276d2da9c0
--- a/jdk/src/share/classes/sun/net/www/protocol/https/AbstractDelegateHttpsURLConnection.java	Thu Sep 15 14:10:30 2011 +0100
+++ b/jdk/src/share/classes/sun/net/www/protocol/https/AbstractDelegateHttpsURLConnection.java	Fri Sep 16 12:09:04 2011 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2001, 2006, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2001, 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
@@ -221,11 +221,11 @@
      */
     public java.security.cert.Certificate[] getLocalCertificates() {
         if (cachedResponse != null) {
-            List l = ((SecureCacheResponse)cachedResponse).getLocalCertificateChain();
+            List<java.security.cert.Certificate> l = ((SecureCacheResponse)cachedResponse).getLocalCertificateChain();
             if (l == null) {
                 return null;
             } else {
-                return (java.security.cert.Certificate[])l.toArray();
+                return l.toArray(new java.security.cert.Certificate[0]);
             }
         }
         if (http == null) {
@@ -243,11 +243,11 @@
     public java.security.cert.Certificate[] getServerCertificates()
             throws SSLPeerUnverifiedException {
         if (cachedResponse != null) {
-            List l = ((SecureCacheResponse)cachedResponse).getServerCertificateChain();
+            List<java.security.cert.Certificate> l = ((SecureCacheResponse)cachedResponse).getServerCertificateChain();
             if (l == null) {
                 return null;
             } else {
-                return (java.security.cert.Certificate[])l.toArray();
+                return l.toArray(new java.security.cert.Certificate[0]);
             }
         }