8003587: Warning cleanup in package javax.net.ssl
Removes unnecessary imports and adds missing Override annotations Reviewed-by: xuelei
This commit is contained in:
parent
a9594cbceb
commit
28ca680a31
@ -29,7 +29,6 @@ import java.util.EventObject;
|
||||
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
|
||||
|
@ -40,6 +40,7 @@ package javax.net.ssl;
|
||||
* verification fail.
|
||||
*
|
||||
* @author Brad R. Wetmore
|
||||
* @see HostnameVerifierFactory
|
||||
* @since 1.4
|
||||
*/
|
||||
|
||||
|
@ -29,7 +29,6 @@ import java.net.URL;
|
||||
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 @@ class HttpsURLConnection extends HttpURLConnection
|
||||
*/
|
||||
private static class DefaultHostnameVerifier
|
||||
implements HostnameVerifier {
|
||||
@Override
|
||||
public boolean verify(String hostname, SSLSession session) {
|
||||
return false;
|
||||
}
|
||||
|
@ -68,6 +68,7 @@ public class KeyManagerFactory {
|
||||
public final static String getDefaultAlgorithm() {
|
||||
String type;
|
||||
type = AccessController.doPrivileged(new PrivilegedAction<String>() {
|
||||
@Override
|
||||
public String run() {
|
||||
return Security.getProperty(
|
||||
"ssl.KeyManagerFactory.algorithm");
|
||||
|
@ -26,7 +26,6 @@
|
||||
package javax.net.ssl;
|
||||
|
||||
import java.security.*;
|
||||
import java.util.*;
|
||||
|
||||
import sun.security.jca.GetInstance;
|
||||
|
||||
|
@ -25,7 +25,6 @@
|
||||
|
||||
package javax.net.ssl;
|
||||
|
||||
import java.util.*;
|
||||
import java.security.*;
|
||||
|
||||
/**
|
||||
|
@ -230,6 +230,7 @@ public class SSLEngineResult {
|
||||
/**
|
||||
* Returns a String representation of this object.
|
||||
*/
|
||||
@Override
|
||||
public String toString() {
|
||||
return ("Status = " + status +
|
||||
" HandshakeStatus = " + handshakeStatus +
|
||||
|
@ -28,13 +28,11 @@ package javax.net.ssl;
|
||||
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
|
||||
|
@ -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.
|
||||
|
@ -160,23 +160,27 @@ class DefaultSSLServerSocketFactory extends SSLServerSocketFactory {
|
||||
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 @@ class DefaultSSLServerSocketFactory extends SSLServerSocketFactory {
|
||||
return throwException();
|
||||
}
|
||||
|
||||
@Override
|
||||
public String [] getDefaultCipherSuites() {
|
||||
return new String[0];
|
||||
}
|
||||
|
||||
@Override
|
||||
public String [] getSupportedCipherSuites() {
|
||||
return new String[0];
|
||||
}
|
||||
|
@ -25,7 +25,6 @@
|
||||
|
||||
package javax.net.ssl;
|
||||
|
||||
import java.net.InetAddress;
|
||||
import java.security.Principal;
|
||||
|
||||
/**
|
||||
|
@ -28,9 +28,6 @@ package javax.net.ssl;
|
||||
|
||||
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
|
||||
|
@ -127,6 +127,7 @@ public abstract class SSLSocketFactory extends SocketFactory
|
||||
|
||||
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 @@ class DefaultSSLSocketFactory extends SSLSocketFactory
|
||||
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 @@ class DefaultSSLSocketFactory extends SSLSocketFactory
|
||||
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 @@ class DefaultSSLSocketFactory extends SSLSocketFactory
|
||||
return throwException();
|
||||
}
|
||||
|
||||
@Override
|
||||
public Socket createSocket(InetAddress address, int port,
|
||||
InetAddress clientAddress, int clientPort)
|
||||
throws IOException
|
||||
@ -286,10 +293,12 @@ class DefaultSSLSocketFactory extends SSLSocketFactory
|
||||
return throwException();
|
||||
}
|
||||
|
||||
@Override
|
||||
public String [] getDefaultCipherSuites() {
|
||||
return new String[0];
|
||||
}
|
||||
|
||||
@Override
|
||||
public String [] getSupportedCipherSuites() {
|
||||
return new String[0];
|
||||
}
|
||||
|
@ -65,6 +65,7 @@ public class TrustManagerFactory {
|
||||
public final static String getDefaultAlgorithm() {
|
||||
String type;
|
||||
type = AccessController.doPrivileged(new PrivilegedAction<String>() {
|
||||
@Override
|
||||
public String run() {
|
||||
return Security.getProperty(
|
||||
"ssl.TrustManagerFactory.algorithm");
|
||||
|
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user