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
--- a/jdk/src/share/classes/java/net/DatagramSocket.java Fri Jul 22 21:31:12 2011 -0700
+++ b/jdk/src/share/classes/java/net/DatagramSocket.java Mon Jul 25 14:35:13 2011 -0700
@@ -176,13 +176,7 @@
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));
}
/**