mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-27 23:04:50 +02:00
8263233: Update java.net and java.nio to use instanceof pattern variable
Reviewed-by: dfuchs, bpb, chegar, michaelm
This commit is contained in:
parent
3fe8a4661c
commit
fdd3941121
17 changed files with 39 additions and 73 deletions
|
@ -373,9 +373,8 @@ public class ServerSocket implements java.io.Closeable {
|
|||
throw new SocketException("Already bound");
|
||||
if (endpoint == null)
|
||||
endpoint = new InetSocketAddress(0);
|
||||
if (!(endpoint instanceof InetSocketAddress))
|
||||
if (!(endpoint instanceof InetSocketAddress epoint))
|
||||
throw new IllegalArgumentException("Unsupported address type");
|
||||
InetSocketAddress epoint = (InetSocketAddress) endpoint;
|
||||
if (epoint.isUnresolved())
|
||||
throw new SocketException("Unresolved address");
|
||||
if (backlog < 1)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue