< prev index next >

test/jdk/java/net/URLConnection/6212146/TestDriver.java

Print this page

 1 /*
 2  * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved.
 3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 4  *
 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
 7  * published by the Free Software Foundation.
 8  *
 9  * This code is distributed in the hope that it will be useful, but WITHOUT
10  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
12  * version 2 for more details (a copy is included in the LICENSE file that
13  * accompanied this code).
14  *
15  * You should have received a copy of the GNU General Public License version
16  * 2 along with this work; if not, write to the Free Software Foundation,
17  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
18  *
19  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
20  * or visit www.oracle.com if you need additional information or have any
21  * questions.
22  */
23 
24 /**
25  * @test
26  * @bug 6212146
27  * @summary URLConnection.connect() fails on JAR Entry it creates
28  * file handler leak
29  * @library /test/lib

30  * @build jdk.test.lib.Utils
31  *        jdk.test.lib.Asserts
32  *        jdk.test.lib.JDKToolFinder
33  *        jdk.test.lib.JDKToolLauncher
34  *        jdk.test.lib.Platform
35  *        jdk.test.lib.process.*
36  *        Test
37  * @run main/othervm TestDriver
38  */
39 
40 import jdk.test.lib.JDKToolFinder;
41 import jdk.test.lib.process.ProcessTools;
42 
43 import java.io.IOException;
44 import java.nio.file.Files;
45 import java.nio.file.Path;
46 import java.nio.file.Paths;
47 
48 import static java.nio.file.StandardCopyOption.REPLACE_EXISTING;
49 

 1 /*
 2  * Copyright (c) 2017, 2024, Oracle and/or its affiliates. All rights reserved.
 3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 4  *
 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
 7  * published by the Free Software Foundation.
 8  *
 9  * This code is distributed in the hope that it will be useful, but WITHOUT
10  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
12  * version 2 for more details (a copy is included in the LICENSE file that
13  * accompanied this code).
14  *
15  * You should have received a copy of the GNU General Public License version
16  * 2 along with this work; if not, write to the Free Software Foundation,
17  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
18  *
19  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
20  * or visit www.oracle.com if you need additional information or have any
21  * questions.
22  */
23 
24 /**
25  * @test
26  * @bug 6212146
27  * @summary URLConnection.connect() fails on JAR Entry it creates
28  * file handler leak
29  * @library /test/lib
30  * @requires vm.flagless
31  * @build jdk.test.lib.Utils
32  *        jdk.test.lib.Asserts
33  *        jdk.test.lib.JDKToolFinder
34  *        jdk.test.lib.JDKToolLauncher
35  *        jdk.test.lib.Platform
36  *        jdk.test.lib.process.*
37  *        Test
38  * @run main/othervm TestDriver
39  */
40 
41 import jdk.test.lib.JDKToolFinder;
42 import jdk.test.lib.process.ProcessTools;
43 
44 import java.io.IOException;
45 import java.nio.file.Files;
46 import java.nio.file.Path;
47 import java.nio.file.Paths;
48 
49 import static java.nio.file.StandardCopyOption.REPLACE_EXISTING;
50 
< prev index next >