The javadoc of Socket.getLocalPort currently reads:
/**
* Returns the local port to which this socket is bound.
*
* @return the local port number to which this socket is connected or -1
* if the socket is not bound yet.
*/
public int getLocalPort()
-> In the @return statement, "connected" should be changed to "bound".
/**
* Returns the local port to which this socket is bound.
*
* @return the local port number to which this socket is connected or -1
* if the socket is not bound yet.
*/
public int getLocalPort()
-> In the @return statement, "connected" should be changed to "bound".