< prev index next >
src/java.base/share/classes/java/net/DatagramSocket.java
Print this page
@@ -302,11 +302,11 @@
}
private void checkOldImpl() {
if (impl == null)
return;
- // DatagramSocketImpl.peekdata() is a protected method, therefore we need to use
+ // DatagramSocketImpl.peekData() is a protected method, therefore we need to use
// getDeclaredMethod, therefore we need permission to access the member
try {
AccessController.doPrivileged(
new PrivilegedExceptionAction<>() {
public Void run() throws NoSuchMethodException {
@@ -658,11 +658,11 @@
synchronized (p) {
if (isClosed())
throw new SocketException("Socket is closed");
checkAddress (p.getAddress(), "send");
if (connectState == ST_NOT_CONNECTED) {
- // check the address is ok wiht the security manager on every send.
+ // check the address is ok with the security manager on every send.
SecurityManager security = System.getSecurityManager();
// The reason you want to synchronize on datagram packet
// is because you don't want an applet to change the address
// while you are trying to send the packet for example
@@ -1068,11 +1068,11 @@
* disabled after a socket is bound (See {@link #isBound()})
* is not defined.
*
* @param on whether to enable or disable the
* @exception SocketException if an error occurs enabling or
- * disabling the {@code SO_RESUEADDR} socket option,
+ * disabling the {@code SO_REUSEADDR} socket option,
* or the socket is closed.
* @since 1.4
* @see #getReuseAddress()
* @see #bind(SocketAddress)
* @see #isBound()
< prev index next >