提交 2e2c3183 编写于 作者: C chegar

7035556: DatagramSocket.java:183: warning: unreachable catch clause

Summary: Remove redundant catches in bind
Reviewed-by: alanb, michaelm, wetmore, chegar
Contributed-by: kurchi.subhra.hazra@oracle.com
上级 92fd97c5
......@@ -176,13 +176,7 @@ class DatagramSocket implements java.io.Closeable {
public DatagramSocket() throws SocketException {
// create a datagram socket.
createImpl();
try {
bind(new InetSocketAddress(0));
} catch (SocketException se) {
throw se;
} catch(IOException e) {
throw new SocketException(e.getMessage());
}
bind(new InetSocketAddress(0));
}
/**
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册