提交 963d7827 编写于 作者: C chegar

8022126: Remove throws SocketException from DatagramPacket constructors accepting SocketAddress

Reviewed-by: smarks, alanb, michaelm, darcy
上级 bb96794e
...@@ -139,8 +139,7 @@ class DatagramPacket { ...@@ -139,8 +139,7 @@ class DatagramPacket {
* *
* @since 1.4 * @since 1.4
*/ */
public DatagramPacket(byte buf[], int offset, int length, public DatagramPacket(byte buf[], int offset, int length, SocketAddress address) {
SocketAddress address) throws SocketException {
setData(buf, offset, length); setData(buf, offset, length);
setSocketAddress(address); setSocketAddress(address);
} }
...@@ -175,8 +174,7 @@ class DatagramPacket { ...@@ -175,8 +174,7 @@ class DatagramPacket {
* @since 1.4 * @since 1.4
* @see java.net.InetAddress * @see java.net.InetAddress
*/ */
public DatagramPacket(byte buf[], int length, public DatagramPacket(byte buf[], int length, SocketAddress address) {
SocketAddress address) throws SocketException {
this(buf, 0, length, address); this(buf, 0, length, address);
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册