changeset 4436:07a12583d4ea

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
author chegar
date Mon, 25 Jul 2011 14:35:13 -0700
parents a499fdfbe723
children c563e8060adf
files src/share/classes/java/net/DatagramSocket.java
diffstat 1 files changed, 1 insertions(+), 7 deletions(-) [+]
line wrap: on
line diff
--- a/src/share/classes/java/net/DatagramSocket.java	Fri Jul 22 21:31:12 2011 -0700
+++ b/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));
     }
 
     /**