Skip to content

Commit 2990ff0

Browse files
committed
8211171: move JarUtils to top-level testlibrary
Reviewed-by: mdoerr Backport-of: ab8c7f7
1 parent f7a75de commit 2990ff0

File tree

42 files changed

+202
-408
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

42 files changed

+202
-408
lines changed

test/jaxp/javax/xml/jaxp/libs/jaxp/library/JarUtils.java

Lines changed: 0 additions & 141 deletions
This file was deleted.

test/jaxp/javax/xml/jaxp/unittest/catalog/CatalogFileInputTest.java

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -42,9 +42,11 @@
4242
import javax.xml.catalog.CatalogFeatures;
4343
import javax.xml.catalog.CatalogManager;
4444
import javax.xml.catalog.CatalogResolver;
45+
4546
import static jaxp.library.JAXPTestUtilities.getSystemProperty;
46-
import jaxp.library.JarUtils;
4747
import jaxp.library.SimpleHttpServer;
48+
import jdk.test.lib.util.JarUtils;
49+
4850
import org.testng.Assert;
4951
import org.testng.annotations.AfterClass;
5052
import org.testng.annotations.BeforeClass;
@@ -56,10 +58,10 @@
5658
/*
5759
* @test
5860
* @bug 8151154 8171243
59-
* @library /javax/xml/jaxp/libs /javax/xml/jaxp/unittest
61+
* @library /javax/xml/jaxp/libs /javax/xml/jaxp/unittest /test/lib
6062
* @run testng/othervm catalog.CatalogFileInputTest
6163
* @summary Verifies that the Catalog API accepts valid URIs only;
62-
Verifies that the CatalogFeatures' builder throws
64+
* Verifies that the CatalogFeatures' builder throws
6365
* IllegalArgumentException on invalid file inputs.
6466
* This test was splitted from CatalogTest.java due to
6567
* JDK-8168968, it has to only run without SecurityManager

test/jdk/java/io/FilePermission/ReadFileOnPath.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
/*
2525
* @test
2626
* @bug 8164705
27-
* @library /lib/testlibrary /test/lib
27+
* @library /test/lib
2828
* @modules java.base/jdk.internal.misc
2929
* jdk.compiler
3030
* @build jdk.test.lib.compiler.CompilerUtils
@@ -34,12 +34,14 @@
3434
* jdk.test.lib.JDKToolLauncher
3535
* jdk.test.lib.Platform
3636
* jdk.test.lib.process.*
37+
* jdk.test.lib.util.JarUtils
3738
* @run main ReadFileOnPath
3839
* @summary Still able to read file on the same path
3940
*/
4041

4142
import jdk.test.lib.process.ProcessTools;
4243
import jdk.test.lib.compiler.CompilerUtils;
44+
import jdk.test.lib.util.JarUtils;
4345

4446
import java.nio.file.Files;
4547
import java.nio.file.Path;

test/jdk/java/io/Serializable/packageAccess/PackageAccessTest.java

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,8 @@
2424
/*
2525
* @test
2626
* @bug 4765255
27-
* @library /lib/testlibrary
28-
* @build JarUtils A B C D PackageAccessTest
27+
* @library /test/lib
28+
* @build jdk.test.lib.util.JarUtils A B C D PackageAccessTest
2929
* @run main PackageAccessTest
3030
* @summary Verify proper functioning of package equality checks used to
3131
* determine accessibility of superclass constructor and inherited
@@ -46,6 +46,8 @@
4646
import java.nio.file.Path;
4747
import java.nio.file.Paths;
4848

49+
import jdk.test.lib.util.JarUtils;
50+
4951
public class PackageAccessTest {
5052

5153
static Class bcl;

test/jdk/java/io/Serializable/resolveClass/consTest/ConsTest.java

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,8 @@
2424
/*
2525
* @test
2626
* @bug 4413434
27-
* @library /lib/testlibrary
28-
* @build JarUtils SetupJar Boot
27+
* @library /test/lib
28+
* @build jdk.test.lib.util.JarUtils SetupJar Boot
2929
* @run driver SetupJar
3030
* @run main/othervm -Xbootclasspath/a:boot.jar ConsTest
3131
* @summary Verify that generated java.lang.reflect implementation classes do
@@ -39,6 +39,8 @@
3939
import java.io.Serializable;
4040
import java.lang.reflect.Constructor;
4141

42+
import jdk.test.lib.util.JarUtils;
43+
4244
public class ConsTest implements Serializable {
4345
public static void main(String[] args) throws Exception {
4446
Constructor cons = Boot.class.getConstructor(

test/jdk/java/io/Serializable/resolveClass/consTest/SetupJar.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,8 @@
2424
import java.nio.file.Path;
2525
import java.nio.file.Paths;
2626

27+
import jdk.test.lib.util.JarUtils;
28+
2729
public class SetupJar {
2830

2931
public static void main(String args[]) throws Exception {

test/jdk/java/io/Serializable/resolveClass/deserializeButton/DeserializeButtonTest.java

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,8 @@
2424
/*
2525
* @test
2626
* @bug 4413434
27-
* @library /lib/testlibrary
28-
* @build JarUtils Foo
27+
* @library /test/lib
28+
* @build jdk.test.lib.util.JarUtils Foo
2929
* @run main DeserializeButtonTest
3030
* @summary Verify that class loaded outside of application class loader is
3131
* correctly resolved during deserialization when read in by custom
@@ -38,6 +38,8 @@
3838
import java.nio.file.Path;
3939
import java.nio.file.Paths;
4040

41+
import jdk.test.lib.util.JarUtils;
42+
4143
public class DeserializeButtonTest {
4244
public static void main(String[] args) throws Exception {
4345
setup();

test/jdk/java/io/Serializable/superclassDataLoss/SuperclassDataLossTest.java

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,8 @@
2424
/*
2525
* @test
2626
* @bug 4325590
27-
* @library /lib/testlibrary
28-
* @build JarUtils A B
27+
* @library /test/lib
28+
* @build jdk.test.lib.util.JarUtils A B
2929
* @run main SuperclassDataLossTest
3030
* @summary Verify that superclass data is not lost when incoming superclass
3131
* descriptor is matched with local class that is not a superclass of
@@ -47,6 +47,8 @@
4747
import java.nio.file.Paths;
4848
import java.nio.file.StandardCopyOption;
4949

50+
import jdk.test.lib.util.JarUtils;
51+
5052
class MixedSuperclassStream extends ObjectInputStream {
5153
private boolean ldr12A;
5254
private URLClassLoader ldr1;

test/jdk/java/lang/ClassLoader/forNameLeak/ClassForNameLeak.java

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,9 @@
2626
* @bug 8151486
2727
* @summary Call Class.forName() on the system classloader from a class loaded
2828
* from a custom classloader.
29-
* @library /lib/testlibrary
30-
* @build jdk.testlibrary.Utils JarUtils
29+
* @library /test/lib
30+
* @build jdk.test.lib.Utils
31+
* jdk.test.lib.util.JarUtils
3132
* @build ClassForName ClassForNameLeak
3233
* @run main/othervm/policy=test.policy -Djava.security.manager ClassForNameLeak
3334
*/
@@ -48,7 +49,8 @@
4849
import java.util.concurrent.Future;
4950
import java.util.stream.Collectors;
5051
import java.util.stream.Stream;
51-
import jdk.testlibrary.Utils;
52+
import jdk.test.lib.Utils;
53+
import jdk.test.lib.util.JarUtils;
5254

5355
/*
5456
* Create .jar, load ClassForName from .jar using a URLClassLoader

test/jdk/java/lang/ClassLoader/getResource/automaticmodules/Driver.java

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,9 @@
2323

2424
/**
2525
* @test
26-
* @library /lib/testlibrary
27-
* @build Driver Main JarUtils jdk.testlibrary.ProcessTools
26+
* @library /lib/testlibrary /test/lib
27+
* @build Driver Main
28+
* jdk.test.lib.util.JarUtils jdk.testlibrary.ProcessTools
2829
* @run main Driver
2930
* @summary Test ClassLoader.getResourceXXX to locate resources in an automatic
3031
* module
@@ -39,6 +40,7 @@
3940
import java.util.jar.Manifest;
4041

4142
import jdk.testlibrary.ProcessTools;
43+
import jdk.test.lib.util.JarUtils;
4244

4345
/**
4446
* The driver creates a JAR file containing p/Foo.class, p/foo.properties,

0 commit comments

Comments
 (0)