test/jdk/java/net/Socket/TestClose.java
changeset 54770 62b6e7587b1f
parent 49431 5812849b5027
child 54811 9db7c0f561a6
equal deleted inserted replaced
54769:925ee7a89325 54770:62b6e7587b1f
    21  * questions.
    21  * questions.
    22  */
    22  */
    23 /*
    23 /*
    24  * @test
    24  * @test
    25  * @bug 4408755
    25  * @bug 4408755
       
    26  * @library /test/lib
    26  * @summary This tests whether it's possible to get some informations
    27  * @summary This tests whether it's possible to get some informations
    27  *          out of a closed socket. This is for backward compatibility
    28  *          out of a closed socket. This is for backward compatibility
    28  *          purposes.
    29  *          purposes.
    29  * @run main TestClose
    30  * @run main TestClose
    30  * @run main/othervm -Djava.net.preferIPv4Stack=true TestClose
    31  * @run main/othervm -Djava.net.preferIPv4Stack=true TestClose
    31  */
    32  */
    32 
    33 
    33 import java.net.*;
    34 import java.net.*;
       
    35 import jdk.test.lib.net.IPSupport;
    34 
    36 
    35 public class TestClose {
    37 public class TestClose {
    36 
    38 
    37     public static void main(String[] args) throws Exception {
    39     public static void main(String[] args) throws Exception {
       
    40         IPSupport.skipIfCurrentConfigurationIsInvalid();
       
    41 
    38         ServerSocket ss;
    42         ServerSocket ss;
    39         Socket s;
    43         Socket s;
    40         InetAddress ad1, ad2;
    44         InetAddress ad1, ad2;
    41         int port1, port2, serverport;
    45         int port1, port2, serverport;
    42 
    46