src/java.base/share/classes/java/net/ServerSocket.java
changeset 48737 7c12219870fd
parent 47216 71c04702a3d5
child 52371 ae4967993e17
equal deleted inserted replaced
48736:0454688cc319 48737:7c12219870fd
     1 /*
     1 /*
     2  * Copyright (c) 1995, 2015, Oracle and/or its affiliates. All rights reserved.
     2  * Copyright (c) 1995, 2018, Oracle and/or its affiliates. All rights reserved.
     3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     4  *
     4  *
     5  * This code is free software; you can redistribute it and/or modify it
     5  * This code is free software; you can redistribute it and/or modify it
     6  * under the terms of the GNU General Public License version 2 only, as
     6  * under the terms of the GNU General Public License version 2 only, as
     7  * published by the Free Software Foundation.  Oracle designates this
     7  * published by the Free Software Foundation.  Oracle designates this
   547             si = s.impl;
   547             si = s.impl;
   548             s.impl = null;
   548             s.impl = null;
   549             si.address = new InetAddress();
   549             si.address = new InetAddress();
   550             si.fd = new FileDescriptor();
   550             si.fd = new FileDescriptor();
   551             getImpl().accept(si);
   551             getImpl().accept(si);
       
   552             SocketCleanable.register(si.fd);   // raw fd has been set
   552 
   553 
   553             SecurityManager security = System.getSecurityManager();
   554             SecurityManager security = System.getSecurityManager();
   554             if (security != null) {
   555             if (security != null) {
   555                 security.checkAccept(si.getInetAddress().getHostAddress(),
   556                 security.checkAccept(si.getInetAddress().getHostAddress(),
   556                                      si.getPort());
   557                                      si.getPort());