8003587: Warning cleanup in package javax.net.ssl
authorxuelei
Sun, 18 Nov 2012 01:31:44 -0800
changeset 14514 46a8ed03c7fc
parent 14513 f6dc8c52e275
child 14515 f67149f8daf6
8003587: Warning cleanup in package javax.net.ssl Summary: Removes unnecessary imports and adds missing Override annotations Reviewed-by: xuelei Contributed-by: Florian Weimer <fweimer@redhat.com>
jdk/src/share/classes/javax/net/ssl/HandshakeCompletedEvent.java
jdk/src/share/classes/javax/net/ssl/HostnameVerifier.java
jdk/src/share/classes/javax/net/ssl/HttpsURLConnection.java
jdk/src/share/classes/javax/net/ssl/KeyManagerFactory.java
jdk/src/share/classes/javax/net/ssl/SSLContext.java
jdk/src/share/classes/javax/net/ssl/SSLContextSpi.java
jdk/src/share/classes/javax/net/ssl/SSLEngineResult.java
jdk/src/share/classes/javax/net/ssl/SSLParameters.java
jdk/src/share/classes/javax/net/ssl/SSLPermission.java
jdk/src/share/classes/javax/net/ssl/SSLServerSocketFactory.java
jdk/src/share/classes/javax/net/ssl/SSLSession.java
jdk/src/share/classes/javax/net/ssl/SSLSocket.java
jdk/src/share/classes/javax/net/ssl/SSLSocketFactory.java
jdk/src/share/classes/javax/net/ssl/TrustManagerFactory.java
jdk/src/share/classes/javax/net/ssl/X509KeyManager.java
--- a/jdk/src/share/classes/javax/net/ssl/HandshakeCompletedEvent.java	Fri Nov 16 17:01:19 2012 -0800
+++ b/jdk/src/share/classes/javax/net/ssl/HandshakeCompletedEvent.java	Sun Nov 18 01:31:44 2012 -0800
@@ -29,7 +29,6 @@
 import java.security.cert.Certificate;
 import java.security.Principal;
 import java.security.cert.X509Certificate;
-import javax.security.auth.x500.X500Principal;
 
 /**
  * This event indicates that an SSL handshake completed on a given
--- a/jdk/src/share/classes/javax/net/ssl/HostnameVerifier.java	Fri Nov 16 17:01:19 2012 -0800
+++ b/jdk/src/share/classes/javax/net/ssl/HostnameVerifier.java	Sun Nov 18 01:31:44 2012 -0800
@@ -40,6 +40,7 @@
  * verification fail.
  *
  * @author Brad R. Wetmore
+ * @see HostnameVerifierFactory
  * @since 1.4
  */
 
--- a/jdk/src/share/classes/javax/net/ssl/HttpsURLConnection.java	Fri Nov 16 17:01:19 2012 -0800
+++ b/jdk/src/share/classes/javax/net/ssl/HttpsURLConnection.java	Sun Nov 18 01:31:44 2012 -0800
@@ -29,7 +29,6 @@
 import java.net.HttpURLConnection;
 import java.security.Principal;
 import java.security.cert.X509Certificate;
-import javax.security.auth.x500.X500Principal;
 
 /**
  * <code>HttpsURLConnection</code> extends <code>HttpURLConnection</code>
@@ -196,6 +195,7 @@
      */
     private static class DefaultHostnameVerifier
             implements HostnameVerifier {
+        @Override
         public boolean verify(String hostname, SSLSession session) {
             return false;
         }
--- a/jdk/src/share/classes/javax/net/ssl/KeyManagerFactory.java	Fri Nov 16 17:01:19 2012 -0800
+++ b/jdk/src/share/classes/javax/net/ssl/KeyManagerFactory.java	Sun Nov 18 01:31:44 2012 -0800
@@ -68,6 +68,7 @@
     public final static String getDefaultAlgorithm() {
         String type;
         type = AccessController.doPrivileged(new PrivilegedAction<String>() {
+            @Override
             public String run() {
                 return Security.getProperty(
                     "ssl.KeyManagerFactory.algorithm");
--- a/jdk/src/share/classes/javax/net/ssl/SSLContext.java	Fri Nov 16 17:01:19 2012 -0800
+++ b/jdk/src/share/classes/javax/net/ssl/SSLContext.java	Sun Nov 18 01:31:44 2012 -0800
@@ -26,7 +26,6 @@
 package javax.net.ssl;
 
 import java.security.*;
-import java.util.*;
 
 import sun.security.jca.GetInstance;
 
--- a/jdk/src/share/classes/javax/net/ssl/SSLContextSpi.java	Fri Nov 16 17:01:19 2012 -0800
+++ b/jdk/src/share/classes/javax/net/ssl/SSLContextSpi.java	Sun Nov 18 01:31:44 2012 -0800
@@ -25,7 +25,6 @@
 
 package javax.net.ssl;
 
-import java.util.*;
 import java.security.*;
 
 /**
--- a/jdk/src/share/classes/javax/net/ssl/SSLEngineResult.java	Fri Nov 16 17:01:19 2012 -0800
+++ b/jdk/src/share/classes/javax/net/ssl/SSLEngineResult.java	Sun Nov 18 01:31:44 2012 -0800
@@ -230,6 +230,7 @@
     /**
      * Returns a String representation of this object.
      */
+    @Override
     public String toString() {
         return ("Status = " + status +
             " HandshakeStatus = " + handshakeStatus +
--- a/jdk/src/share/classes/javax/net/ssl/SSLParameters.java	Fri Nov 16 17:01:19 2012 -0800
+++ b/jdk/src/share/classes/javax/net/ssl/SSLParameters.java	Sun Nov 18 01:31:44 2012 -0800
@@ -28,13 +28,11 @@
 import java.security.AlgorithmConstraints;
 import java.util.Map;
 import java.util.List;
-import java.util.HashSet;
 import java.util.HashMap;
 import java.util.ArrayList;
 import java.util.Collection;
 import java.util.Collections;
 import java.util.LinkedHashMap;
-import java.util.regex.Pattern;
 
 /**
  * Encapsulates parameters for an SSL/TLS connection. The parameters
--- a/jdk/src/share/classes/javax/net/ssl/SSLPermission.java	Fri Nov 16 17:01:19 2012 -0800
+++ b/jdk/src/share/classes/javax/net/ssl/SSLPermission.java	Sun Nov 18 01:31:44 2012 -0800
@@ -26,11 +26,6 @@
 package javax.net.ssl;
 
 import java.security.*;
-import java.util.Enumeration;
-import java.util.Hashtable;
-import java.util.StringTokenizer;
-import java.security.Permissions;
-import java.lang.SecurityManager;
 
 /**
  * This class is for various network permissions.
--- a/jdk/src/share/classes/javax/net/ssl/SSLServerSocketFactory.java	Fri Nov 16 17:01:19 2012 -0800
+++ b/jdk/src/share/classes/javax/net/ssl/SSLServerSocketFactory.java	Sun Nov 18 01:31:44 2012 -0800
@@ -160,23 +160,27 @@
             new SocketException(reason.toString()).initCause(reason);
     }
 
+    @Override
     public ServerSocket createServerSocket() throws IOException {
         return throwException();
     }
 
 
+    @Override
     public ServerSocket createServerSocket(int port)
     throws IOException
     {
         return throwException();
     }
 
+    @Override
     public ServerSocket createServerSocket(int port, int backlog)
     throws IOException
     {
         return throwException();
     }
 
+    @Override
     public ServerSocket
     createServerSocket(int port, int backlog, InetAddress ifAddress)
     throws IOException
@@ -184,10 +188,12 @@
         return throwException();
     }
 
+    @Override
     public String [] getDefaultCipherSuites() {
         return new String[0];
     }
 
+    @Override
     public String [] getSupportedCipherSuites() {
         return new String[0];
     }
--- a/jdk/src/share/classes/javax/net/ssl/SSLSession.java	Fri Nov 16 17:01:19 2012 -0800
+++ b/jdk/src/share/classes/javax/net/ssl/SSLSession.java	Sun Nov 18 01:31:44 2012 -0800
@@ -25,7 +25,6 @@
 
 package javax.net.ssl;
 
-import java.net.InetAddress;
 import java.security.Principal;
 
 /**
--- a/jdk/src/share/classes/javax/net/ssl/SSLSocket.java	Fri Nov 16 17:01:19 2012 -0800
+++ b/jdk/src/share/classes/javax/net/ssl/SSLSocket.java	Sun Nov 18 01:31:44 2012 -0800
@@ -28,9 +28,6 @@
 
 import java.io.IOException;
 import java.net.*;
-import java.util.Enumeration;
-import java.util.Vector;
-
 
 /**
  * This class extends <code>Socket</code>s and provides secure
--- a/jdk/src/share/classes/javax/net/ssl/SSLSocketFactory.java	Fri Nov 16 17:01:19 2012 -0800
+++ b/jdk/src/share/classes/javax/net/ssl/SSLSocketFactory.java	Sun Nov 18 01:31:44 2012 -0800
@@ -127,6 +127,7 @@
 
     static String getSecurityProperty(final String name) {
         return AccessController.doPrivileged(new PrivilegedAction<String>() {
+            @Override
             public String run() {
                 String s = java.security.Security.getProperty(name);
                 if (s != null) {
@@ -247,18 +248,21 @@
             new SocketException(reason.toString()).initCause(reason);
     }
 
+    @Override
     public Socket createSocket()
     throws IOException
     {
         return throwException();
     }
 
+    @Override
     public Socket createSocket(String host, int port)
     throws IOException
     {
         return throwException();
     }
 
+    @Override
     public Socket createSocket(Socket s, String host,
                                 int port, boolean autoClose)
     throws IOException
@@ -266,12 +270,14 @@
         return throwException();
     }
 
+    @Override
     public Socket createSocket(InetAddress address, int port)
     throws IOException
     {
         return throwException();
     }
 
+    @Override
     public Socket createSocket(String host, int port,
         InetAddress clientAddress, int clientPort)
     throws IOException
@@ -279,6 +285,7 @@
         return throwException();
     }
 
+    @Override
     public Socket createSocket(InetAddress address, int port,
         InetAddress clientAddress, int clientPort)
     throws IOException
@@ -286,10 +293,12 @@
         return throwException();
     }
 
+    @Override
     public String [] getDefaultCipherSuites() {
         return new String[0];
     }
 
+    @Override
     public String [] getSupportedCipherSuites() {
         return new String[0];
     }
--- a/jdk/src/share/classes/javax/net/ssl/TrustManagerFactory.java	Fri Nov 16 17:01:19 2012 -0800
+++ b/jdk/src/share/classes/javax/net/ssl/TrustManagerFactory.java	Sun Nov 18 01:31:44 2012 -0800
@@ -65,6 +65,7 @@
     public final static String getDefaultAlgorithm() {
         String type;
         type = AccessController.doPrivileged(new PrivilegedAction<String>() {
+            @Override
             public String run() {
                 return Security.getProperty(
                     "ssl.TrustManagerFactory.algorithm");
--- a/jdk/src/share/classes/javax/net/ssl/X509KeyManager.java	Fri Nov 16 17:01:19 2012 -0800
+++ b/jdk/src/share/classes/javax/net/ssl/X509KeyManager.java	Sun Nov 18 01:31:44 2012 -0800
@@ -25,7 +25,6 @@
 
 package javax.net.ssl;
 
-import java.security.KeyManagementException;
 import java.security.PrivateKey;
 import java.security.Principal;
 import java.security.cert.X509Certificate;