8237075: @since tag missing from DatagramSocket and MulticastSocket methods
Methods from DatagramSocket and MulticastSocket added in JDK1.2 do not have their @since tags. This fix adds them in Reviewed-by: alanb, chegar, dfuchs
This commit is contained in:
parent
d462a6b5c9
commit
a589a15e3f
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 1995, 2019, Oracle and/or its affiliates. All rights reserved.
|
* Copyright (c) 1995, 2020, Oracle and/or its affiliates. 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
|
||||||
@ -499,6 +499,7 @@ public class DatagramSocket implements java.io.Closeable {
|
|||||||
* not permit access to the given remote address
|
* not permit access to the given remote address
|
||||||
*
|
*
|
||||||
* @see #disconnect
|
* @see #disconnect
|
||||||
|
* @since 1.2
|
||||||
*/
|
*/
|
||||||
public void connect(InetAddress address, int port) {
|
public void connect(InetAddress address, int port) {
|
||||||
try {
|
try {
|
||||||
@ -546,6 +547,7 @@ public class DatagramSocket implements java.io.Closeable {
|
|||||||
* then this method has no effect.
|
* then this method has no effect.
|
||||||
*
|
*
|
||||||
* @see #connect
|
* @see #connect
|
||||||
|
* @since 1.2
|
||||||
*/
|
*/
|
||||||
public void disconnect() {
|
public void disconnect() {
|
||||||
synchronized (this) {
|
synchronized (this) {
|
||||||
@ -598,6 +600,7 @@ public class DatagramSocket implements java.io.Closeable {
|
|||||||
* after the socket is closed.
|
* after the socket is closed.
|
||||||
*
|
*
|
||||||
* @return the address to which this socket is connected.
|
* @return the address to which this socket is connected.
|
||||||
|
* @since 1.2
|
||||||
*/
|
*/
|
||||||
public InetAddress getInetAddress() {
|
public InetAddress getInetAddress() {
|
||||||
return connectedAddress;
|
return connectedAddress;
|
||||||
@ -612,6 +615,7 @@ public class DatagramSocket implements java.io.Closeable {
|
|||||||
* after the socket is closed.
|
* after the socket is closed.
|
||||||
*
|
*
|
||||||
* @return the port number to which this socket is connected.
|
* @return the port number to which this socket is connected.
|
||||||
|
* @since 1.2
|
||||||
*/
|
*/
|
||||||
public int getPort() {
|
public int getPort() {
|
||||||
return connectedPort;
|
return connectedPort;
|
||||||
@ -1009,6 +1013,7 @@ public class DatagramSocket implements java.io.Closeable {
|
|||||||
* @throws IllegalArgumentException if the value is 0 or is
|
* @throws IllegalArgumentException if the value is 0 or is
|
||||||
* negative.
|
* negative.
|
||||||
* @see #getSendBufferSize()
|
* @see #getSendBufferSize()
|
||||||
|
* @since 1.2
|
||||||
*/
|
*/
|
||||||
public synchronized void setSendBufferSize(int size) throws SocketException {
|
public synchronized void setSendBufferSize(int size) throws SocketException {
|
||||||
if (!(size > 0)) {
|
if (!(size > 0)) {
|
||||||
@ -1027,6 +1032,7 @@ public class DatagramSocket implements java.io.Closeable {
|
|||||||
* @throws SocketException if there is an error in
|
* @throws SocketException if there is an error in
|
||||||
* the underlying protocol, such as an UDP error.
|
* the underlying protocol, such as an UDP error.
|
||||||
* @see #setSendBufferSize
|
* @see #setSendBufferSize
|
||||||
|
* @since 1.2
|
||||||
*/
|
*/
|
||||||
public synchronized int getSendBufferSize() throws SocketException {
|
public synchronized int getSendBufferSize() throws SocketException {
|
||||||
if (isClosed())
|
if (isClosed())
|
||||||
@ -1066,6 +1072,7 @@ public class DatagramSocket implements java.io.Closeable {
|
|||||||
* @throws IllegalArgumentException if the value is 0 or is
|
* @throws IllegalArgumentException if the value is 0 or is
|
||||||
* negative.
|
* negative.
|
||||||
* @see #getReceiveBufferSize()
|
* @see #getReceiveBufferSize()
|
||||||
|
* @since 1.2
|
||||||
*/
|
*/
|
||||||
public synchronized void setReceiveBufferSize(int size) throws SocketException {
|
public synchronized void setReceiveBufferSize(int size) throws SocketException {
|
||||||
if (size <= 0) {
|
if (size <= 0) {
|
||||||
@ -1083,6 +1090,7 @@ public class DatagramSocket implements java.io.Closeable {
|
|||||||
* @return the value of the SO_RCVBUF option for this {@code DatagramSocket}
|
* @return the value of the SO_RCVBUF option for this {@code DatagramSocket}
|
||||||
* @throws SocketException if there is an error in the underlying protocol, such as an UDP error.
|
* @throws SocketException if there is an error in the underlying protocol, such as an UDP error.
|
||||||
* @see #setReceiveBufferSize(int)
|
* @see #setReceiveBufferSize(int)
|
||||||
|
* @since 1.2
|
||||||
*/
|
*/
|
||||||
public synchronized int getReceiveBufferSize() throws SocketException {
|
public synchronized int getReceiveBufferSize() throws SocketException {
|
||||||
if (isClosed())
|
if (isClosed())
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 1995, 2019, Oracle and/or its affiliates. All rights reserved.
|
* Copyright (c) 1995, 2020, Oracle and/or its affiliates. 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
|
||||||
@ -280,6 +280,7 @@ public class MulticastSocket extends DatagramSocket {
|
|||||||
* default time-to-live value
|
* default time-to-live value
|
||||||
*
|
*
|
||||||
* @see #getTimeToLive()
|
* @see #getTimeToLive()
|
||||||
|
* @since 1.2
|
||||||
*/
|
*/
|
||||||
public void setTimeToLive(int ttl) throws IOException {
|
public void setTimeToLive(int ttl) throws IOException {
|
||||||
if (ttl < 0 || ttl > 255) {
|
if (ttl < 0 || ttl > 255) {
|
||||||
@ -315,6 +316,7 @@ public class MulticastSocket extends DatagramSocket {
|
|||||||
* getting the default time-to-live value
|
* getting the default time-to-live value
|
||||||
* @return the default time-to-live value
|
* @return the default time-to-live value
|
||||||
* @see #setTimeToLive(int)
|
* @see #setTimeToLive(int)
|
||||||
|
* @since 1.2
|
||||||
*/
|
*/
|
||||||
public int getTimeToLive() throws IOException {
|
public int getTimeToLive() throws IOException {
|
||||||
if (isClosed())
|
if (isClosed())
|
||||||
|
Loading…
x
Reference in New Issue
Block a user