提交 adb1e37e 编写于 作者: X xuelei

6571950: SSLSocket(raddr, rport, laddr, lport) allows null as laddr that spec doesn't reflect

Summary: add the description that while the local address parameter is null, anyLocalAddress will be used instead.
Reviewed-by: weijun
上级 f17a1092
/* /*
* Copyright 1995-2007 Sun Microsystems, Inc. All Rights Reserved. * Copyright 1995-2008 Sun Microsystems, Inc. All Rights Reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
...@@ -253,7 +253,8 @@ class Socket implements java.io.Closeable { ...@@ -253,7 +253,8 @@ class Socket implements java.io.Closeable {
* *
* @param host the name of the remote host, or <code>null</code> for the loopback address. * @param host the name of the remote host, or <code>null</code> for the loopback address.
* @param port the remote port * @param port the remote port
* @param localAddr the local address the socket is bound to * @param localAddr the local address the socket is bound to, or
* <code>null</code> for the <code>anyLocal</code> address.
* @param localPort the local port the socket is bound to, or * @param localPort the local port the socket is bound to, or
* <code>zero</code> for a system selected free port. * <code>zero</code> for a system selected free port.
* @exception IOException if an I/O error occurs when creating the socket. * @exception IOException if an I/O error occurs when creating the socket.
......
/* /*
* Copyright 1997-2007 Sun Microsystems, Inc. All Rights Reserved. * Copyright 1997-2008 Sun Microsystems, Inc. All Rights Reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
...@@ -212,8 +212,10 @@ public abstract class SSLSocket extends Socket ...@@ -212,8 +212,10 @@ public abstract class SSLSocket extends Socket
* @param host name of the host with which to connect, or * @param host name of the host with which to connect, or
* <code>null</code> for the loopback address. * <code>null</code> for the loopback address.
* @param port number of the server's port * @param port number of the server's port
* @param clientAddress the client's host * @param clientAddress the client's address the socket is bound to, or
* @param clientPort number of the client's port * <code>null</code> for the <code>anyLocal</code> address.
* @param clientPort the client's port the socket is bound to, or
* <code>zero</code> for a system selected free port.
* @throws IOException if an I/O error occurs when creating the socket * @throws IOException if an I/O error occurs when creating the socket
* @throws SecurityException if a security manager exists and its * @throws SecurityException if a security manager exists and its
* <code>checkConnect</code> method doesn't allow the operation. * <code>checkConnect</code> method doesn't allow the operation.
...@@ -241,8 +243,10 @@ public abstract class SSLSocket extends Socket ...@@ -241,8 +243,10 @@ public abstract class SSLSocket extends Socket
* *
* @param address the server's host * @param address the server's host
* @param port its port * @param port its port
* @param clientAddress the client's host * @param clientAddress the client's address the socket is bound to, or
* @param clientPort number of the client's port * <code>null</code> for the <code>anyLocal</code> address.
* @param clientPort the client's port the socket is bound to, or
* <code>zero</code> for a system selected free port.
* @throws IOException if an I/O error occurs when creating the socket * @throws IOException if an I/O error occurs when creating the socket
* @throws SecurityException if a security manager exists and its * @throws SecurityException if a security manager exists and its
* <code>checkConnect</code> method doesn't allow the operation. * <code>checkConnect</code> method doesn't allow the operation.
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册