# HG changeset patch # User iignatyev # Date 1537987641 25200 # Wed Sep 26 11:47:21 2018 -0700 # Node ID 9704f523d9d2c3e3cc917f33a8628bcdc07be4b0 # Parent ec4c3c287ca718e279be0d4c0956b375cea16afe [mq]: 8211171 diff --git a/test/hotspot/jtreg/runtime/Dictionary/ProtectionDomainCacheTest.java b/test/hotspot/jtreg/runtime/Dictionary/ProtectionDomainCacheTest.java --- a/test/hotspot/jtreg/runtime/Dictionary/ProtectionDomainCacheTest.java +++ b/test/hotspot/jtreg/runtime/Dictionary/ProtectionDomainCacheTest.java @@ -26,7 +26,6 @@ * @bug 8151486 * @summary Call Class.forName() on the system classloader from a class loaded * from a custom classloader, using the current class's protection domain. - * @library /test/jdk/lib/testlibrary * @library /test/lib * @build jdk.test.lib.Utils JarUtils * @build ClassForName ProtectionDomainCacheTest diff --git a/test/jaxp/javax/xml/jaxp/libs/jaxp/library/JarUtils.java b/test/jaxp/javax/xml/jaxp/libs/jaxp/library/JarUtils.java deleted file mode 100644 --- a/test/jaxp/javax/xml/jaxp/libs/jaxp/library/JarUtils.java +++ /dev/null @@ -1,141 +0,0 @@ -/* - * Copyright (c) 2015, 2017, Oracle and/or its affiliates. All rights reserved. - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * This code is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - */ -package jaxp.library; - -import java.io.File; -import java.io.IOException; -import java.io.OutputStream; -import java.nio.file.Files; -import java.nio.file.Path; -import java.nio.file.Paths; -import java.nio.file.StandardCopyOption; -import java.util.ArrayList; -import java.util.Enumeration; -import java.util.List; -import java.util.Set; -import java.util.jar.JarEntry; -import java.util.jar.JarFile; -import java.util.jar.JarOutputStream; -import java.util.jar.Manifest; -import java.util.stream.Collectors; -import java.util.stream.Stream; - -/** - * This class consists exclusively of static utility methods that are useful - * for creating and manipulating JAR files. - */ - -public final class JarUtils { - private JarUtils() { } - - /** - * Creates a JAR file. - * - * Equivalent to {@code jar cfm -C file...} - * - * The input files are resolved against the given directory. Any input - * files that are directories are processed recursively. - */ - public static void createJarFile(Path jarfile, Manifest man, Path dir, Path... file) - throws IOException - { - // create the target directory - Path parent = jarfile.getParent(); - if (parent != null) - Files.createDirectories(parent); - - List entries = new ArrayList<>(); - for (Path entry : file) { - Files.find(dir.resolve(entry), Integer.MAX_VALUE, - (p, attrs) -> attrs.isRegularFile()) - .map(e -> dir.relativize(e)) - .forEach(entries::add); - } - - try (OutputStream out = Files.newOutputStream(jarfile); - JarOutputStream jos = new JarOutputStream(out)) - { - if (man != null) { - JarEntry je = new JarEntry(JarFile.MANIFEST_NAME); - jos.putNextEntry(je); - man.write(jos); - jos.closeEntry(); - } - - for (Path entry : entries) { - String name = toJarEntryName(entry); - jos.putNextEntry(new JarEntry(name)); - Files.copy(dir.resolve(entry), jos); - jos.closeEntry(); - } - } - } - - /** - * Creates a JAR file. - * - * Equivalent to {@code jar cf -C file...} - * - * The input files are resolved against the given directory. Any input - * files that are directories are processed recursively. - */ - public static void createJarFile(Path jarfile, Path dir, Path... file) - throws IOException - { - createJarFile(jarfile, null, dir, file); - } - - /** - * Creates a JAR file. - * - * Equivalent to {@code jar cf -C file...} - * - * The input files are resolved against the given directory. Any input - * files that are directories are processed recursively. - */ - public static void createJarFile(Path jarfile, Path dir, String... input) - throws IOException - { - Path[] paths = Stream.of(input).map(Paths::get).toArray(Path[]::new); - createJarFile(jarfile, dir, paths); - } - - /** - * Creates a JAR file from the contents of a directory. - * - * Equivalent to {@code jar cf -C .} - */ - public static void createJarFile(Path jarfile, Path dir) throws IOException { - createJarFile(jarfile, dir, Paths.get(".")); - } - - /** - * Map a file path to the equivalent name in a JAR file - */ - private static String toJarEntryName(Path file) { - Path normalized = file.normalize(); - return normalized.subpath(0, normalized.getNameCount()) // drop root - .toString() - .replace(File.separatorChar, '/'); - } -} diff --git a/test/jaxp/javax/xml/jaxp/unittest/catalog/CatalogFileInputTest.java b/test/jaxp/javax/xml/jaxp/unittest/catalog/CatalogFileInputTest.java --- a/test/jaxp/javax/xml/jaxp/unittest/catalog/CatalogFileInputTest.java +++ b/test/jaxp/javax/xml/jaxp/unittest/catalog/CatalogFileInputTest.java @@ -43,7 +43,6 @@ import javax.xml.catalog.CatalogManager; import javax.xml.catalog.CatalogResolver; import static jaxp.library.JAXPTestUtilities.getSystemProperty; -import jaxp.library.JarUtils; import jaxp.library.SimpleHttpServer; import org.testng.Assert; import org.testng.annotations.AfterClass; @@ -56,10 +55,10 @@ /* * @test * @bug 8151154 8171243 - * @library /javax/xml/jaxp/libs /javax/xml/jaxp/unittest + * @library /javax/xml/jaxp/libs /javax/xml/jaxp/unittest /test/lib * @run testng/othervm catalog.CatalogFileInputTest * @summary Verifies that the Catalog API accepts valid URIs only; - Verifies that the CatalogFeatures' builder throws + * Verifies that the CatalogFeatures' builder throws * IllegalArgumentException on invalid file inputs. * This test was splitted from CatalogTest.java due to * JDK-8168968, it has to only run without SecurityManager diff --git a/test/jdk/java/io/FilePermission/ReadFileOnPath.java b/test/jdk/java/io/FilePermission/ReadFileOnPath.java --- a/test/jdk/java/io/FilePermission/ReadFileOnPath.java +++ b/test/jdk/java/io/FilePermission/ReadFileOnPath.java @@ -24,7 +24,7 @@ /* * @test * @bug 8164705 - * @library /lib/testlibrary /test/lib + * @library /test/lib * @modules java.base/jdk.internal.misc * jdk.compiler * @build jdk.test.lib.compiler.CompilerUtils diff --git a/test/jdk/java/io/Serializable/packageAccess/PackageAccessTest.java b/test/jdk/java/io/Serializable/packageAccess/PackageAccessTest.java --- a/test/jdk/java/io/Serializable/packageAccess/PackageAccessTest.java +++ b/test/jdk/java/io/Serializable/packageAccess/PackageAccessTest.java @@ -24,7 +24,7 @@ /* * @test * @bug 4765255 - * @library /lib/testlibrary + * @library /test/lib * @build JarUtils A B C D PackageAccessTest * @run main PackageAccessTest * @summary Verify proper functioning of package equality checks used to diff --git a/test/jdk/java/io/Serializable/resolveClass/consTest/ConsTest.java b/test/jdk/java/io/Serializable/resolveClass/consTest/ConsTest.java --- a/test/jdk/java/io/Serializable/resolveClass/consTest/ConsTest.java +++ b/test/jdk/java/io/Serializable/resolveClass/consTest/ConsTest.java @@ -24,7 +24,7 @@ /* * @test * @bug 4413434 - * @library /lib/testlibrary + * @library /test/lib * @build JarUtils SetupJar Boot * @run driver SetupJar * @run main/othervm -Xbootclasspath/a:boot.jar ConsTest diff --git a/test/jdk/java/io/Serializable/resolveClass/deserializeButton/DeserializeButtonTest.java b/test/jdk/java/io/Serializable/resolveClass/deserializeButton/DeserializeButtonTest.java --- a/test/jdk/java/io/Serializable/resolveClass/deserializeButton/DeserializeButtonTest.java +++ b/test/jdk/java/io/Serializable/resolveClass/deserializeButton/DeserializeButtonTest.java @@ -24,7 +24,7 @@ /* * @test * @bug 4413434 - * @library /lib/testlibrary + * @library /test/lib * @build JarUtils Foo * @run main DeserializeButtonTest * @summary Verify that class loaded outside of application class loader is diff --git a/test/jdk/java/io/Serializable/superclassDataLoss/SuperclassDataLossTest.java b/test/jdk/java/io/Serializable/superclassDataLoss/SuperclassDataLossTest.java --- a/test/jdk/java/io/Serializable/superclassDataLoss/SuperclassDataLossTest.java +++ b/test/jdk/java/io/Serializable/superclassDataLoss/SuperclassDataLossTest.java @@ -24,7 +24,7 @@ /* * @test * @bug 4325590 - * @library /lib/testlibrary + * @library /test/lib * @build JarUtils A B * @run main SuperclassDataLossTest * @summary Verify that superclass data is not lost when incoming superclass diff --git a/test/jdk/java/lang/ClassLoader/forNameLeak/ClassForNameLeak.java b/test/jdk/java/lang/ClassLoader/forNameLeak/ClassForNameLeak.java --- a/test/jdk/java/lang/ClassLoader/forNameLeak/ClassForNameLeak.java +++ b/test/jdk/java/lang/ClassLoader/forNameLeak/ClassForNameLeak.java @@ -26,7 +26,6 @@ * @bug 8151486 * @summary Call Class.forName() on the system classloader from a class loaded * from a custom classloader. - * @library /lib/testlibrary * @library /test/lib * @build jdk.test.lib.Utils JarUtils * @build ClassForName ClassForNameLeak diff --git a/test/jdk/java/lang/ClassLoader/getResource/automaticmodules/Driver.java b/test/jdk/java/lang/ClassLoader/getResource/automaticmodules/Driver.java --- a/test/jdk/java/lang/ClassLoader/getResource/automaticmodules/Driver.java +++ b/test/jdk/java/lang/ClassLoader/getResource/automaticmodules/Driver.java @@ -23,7 +23,7 @@ /** * @test - * @library /lib/testlibrary /test/lib + * @library /test/lib * @build Driver Main JarUtils * @run main Driver * @summary Test ClassLoader.getResourceXXX to locate resources in an automatic diff --git a/test/jdk/java/lang/ClassLoader/securityManager/ClassLoaderTest.java b/test/jdk/java/lang/ClassLoader/securityManager/ClassLoaderTest.java --- a/test/jdk/java/lang/ClassLoader/securityManager/ClassLoaderTest.java +++ b/test/jdk/java/lang/ClassLoader/securityManager/ClassLoaderTest.java @@ -26,7 +26,6 @@ * @bug 8168423 * @summary Different types of ClassLoader running with(out) SecurityManager and * (in)valid security policy file. - * @library /lib/testlibrary * @library /test/lib * @modules java.base/jdk.internal.module * @build JarUtils diff --git a/test/jdk/java/lang/Package/IsCompatibleWithDriver.java b/test/jdk/java/lang/Package/IsCompatibleWithDriver.java --- a/test/jdk/java/lang/Package/IsCompatibleWithDriver.java +++ b/test/jdk/java/lang/Package/IsCompatibleWithDriver.java @@ -25,7 +25,6 @@ * @test * @bug 4227825 4785473 * @summary Test behaviour of Package.isCompatibleWith(). - * @library /lib/testlibrary * @library /test/lib * @build A IsCompatibleWith * JarUtils diff --git a/test/jdk/java/lang/Package/PackageFromManifest.java b/test/jdk/java/lang/Package/PackageFromManifest.java --- a/test/jdk/java/lang/Package/PackageFromManifest.java +++ b/test/jdk/java/lang/Package/PackageFromManifest.java @@ -27,7 +27,6 @@ * @summary The test will create JAR file(s) with the manifest file * that customized package versioning information (different info for * same package if multiple jars). Then verify package versioning info - * @library /lib/testlibrary * @library /test/lib * @modules jdk.compiler * @run main PackageFromManifest setup test diff --git a/test/jdk/java/lang/instrument/executableJAR/ExecJarWithAgent.java b/test/jdk/java/lang/instrument/executableJAR/ExecJarWithAgent.java --- a/test/jdk/java/lang/instrument/executableJAR/ExecJarWithAgent.java +++ b/test/jdk/java/lang/instrument/executableJAR/ExecJarWithAgent.java @@ -23,9 +23,8 @@ /** * @test - * @library /lib/testlibrary * @library /test/lib - * @build ExecJarWithAgent Main Agent AgentHelper JarUtils jdk.testlibrary.* + * @build ExecJarWithAgent Main Agent AgentHelper JarUtils * @run testng ExecJarWithAgent * @summary Test starting agents in executable JAR files */ diff --git a/test/jdk/java/lang/module/AutomaticModulesTest.java b/test/jdk/java/lang/module/AutomaticModulesTest.java --- a/test/jdk/java/lang/module/AutomaticModulesTest.java +++ b/test/jdk/java/lang/module/AutomaticModulesTest.java @@ -23,7 +23,7 @@ /** * @test - * @library /lib/testlibrary + * @library /lib/testlibrary /test/lib * @build AutomaticModulesTest ModuleUtils JarUtils * @run testng AutomaticModulesTest * @summary Basic tests for automatic modules diff --git a/test/jdk/java/lang/module/ModuleReader/ModuleReaderTest.java b/test/jdk/java/lang/module/ModuleReader/ModuleReaderTest.java --- a/test/jdk/java/lang/module/ModuleReader/ModuleReaderTest.java +++ b/test/jdk/java/lang/module/ModuleReader/ModuleReaderTest.java @@ -23,7 +23,7 @@ /** * @test - * @library /lib/testlibrary /test/lib + * @library /test/lib * @modules java.base/jdk.internal.module * jdk.compiler * jdk.jlink diff --git a/test/jdk/java/lang/module/MultiReleaseJarTest.java b/test/jdk/java/lang/module/MultiReleaseJarTest.java --- a/test/jdk/java/lang/module/MultiReleaseJarTest.java +++ b/test/jdk/java/lang/module/MultiReleaseJarTest.java @@ -23,7 +23,7 @@ /** * @test - * @library /lib/testlibrary + * @library /test/lib * @modules java.base/jdk.internal.module * @build MultiReleaseJarTest JarUtils * @run testng MultiReleaseJarTest diff --git a/test/jdk/java/lang/module/customfs/ModulesInCustomFileSystem.java b/test/jdk/java/lang/module/customfs/ModulesInCustomFileSystem.java --- a/test/jdk/java/lang/module/customfs/ModulesInCustomFileSystem.java +++ b/test/jdk/java/lang/module/customfs/ModulesInCustomFileSystem.java @@ -24,7 +24,7 @@ /** * @test * @modules jdk.zipfs - * @library /lib/testlibrary + * @library /test/lib * @build ModulesInCustomFileSystem JarUtils m1/* m2/* * @run testng/othervm ModulesInCustomFileSystem * @summary Test ModuleFinder to find modules in a custom file system diff --git a/test/jdk/java/net/URLClassLoader/closetest/CloseTest.java b/test/jdk/java/net/URLClassLoader/closetest/CloseTest.java --- a/test/jdk/java/net/URLClassLoader/closetest/CloseTest.java +++ b/test/jdk/java/net/URLClassLoader/closetest/CloseTest.java @@ -28,7 +28,6 @@ * jdk.httpserver * jdk.compiler * @library ../../../../com/sun/net/httpserver - * /lib/testlibrary * /test/lib * @build jdk.test.lib.compiler.CompilerUtils * jdk.test.lib.util.FileUtils diff --git a/test/jdk/java/net/URLClassLoader/closetest/GetResourceAsStream.java b/test/jdk/java/net/URLClassLoader/closetest/GetResourceAsStream.java --- a/test/jdk/java/net/URLClassLoader/closetest/GetResourceAsStream.java +++ b/test/jdk/java/net/URLClassLoader/closetest/GetResourceAsStream.java @@ -24,7 +24,7 @@ /** * @test * @bug 6899919 - * @library /lib/testlibrary /test/lib + * @library /test/lib * @modules jdk.compiler * @build jdk.test.lib.compiler.CompilerUtils * jdk.test.lib.util.FileUtils diff --git a/test/jdk/java/nio/channels/AsynchronousChannelGroup/AsExecutor.java b/test/jdk/java/nio/channels/AsynchronousChannelGroup/AsExecutor.java --- a/test/jdk/java/nio/channels/AsynchronousChannelGroup/AsExecutor.java +++ b/test/jdk/java/nio/channels/AsynchronousChannelGroup/AsExecutor.java @@ -25,7 +25,7 @@ * @test * @bug 4607272 * @summary tests tasks can be submitted to a channel group's thread pool. - * @library /lib/testlibrary bootlib + * @library /test/lib bootlib * @build JarUtils PrivilegedThreadFactory Attack * @run driver SetupJar * @run main/othervm -Xbootclasspath/a:privileged.jar AsExecutor diff --git a/test/jdk/java/nio/charset/spi/CharsetProviderBasicTest.java b/test/jdk/java/nio/charset/spi/CharsetProviderBasicTest.java --- a/test/jdk/java/nio/charset/spi/CharsetProviderBasicTest.java +++ b/test/jdk/java/nio/charset/spi/CharsetProviderBasicTest.java @@ -26,7 +26,6 @@ * @bug 4429040 4591027 4814743 * @summary Unit test for charset providers * @library /test/lib - * /lib/testlibrary * @build jdk.test.lib.Utils * jdk.test.lib.Asserts * jdk.test.lib.JDKToolFinder diff --git a/test/jdk/java/rmi/module/ModuleTest.java b/test/jdk/java/rmi/module/ModuleTest.java --- a/test/jdk/java/rmi/module/ModuleTest.java +++ b/test/jdk/java/rmi/module/ModuleTest.java @@ -23,7 +23,7 @@ /** * @test - * @library /lib/testlibrary /test/lib + * @library /test/lib * @build jdk.test.lib.process.ProcessTools * ModuleTest jdk.test.lib.compiler.CompilerUtils JarUtils * @run testng ModuleTest diff --git a/test/jdk/java/security/Provider/SecurityProviderModularTest.java b/test/jdk/java/security/Provider/SecurityProviderModularTest.java --- a/test/jdk/java/security/Provider/SecurityProviderModularTest.java +++ b/test/jdk/java/security/Provider/SecurityProviderModularTest.java @@ -47,7 +47,7 @@ * @bug 8130360 8183310 * @summary Test security provider in different combination of modular option * defined with(out) service description. - * @library /lib/testlibrary /test/lib + * @library /test/lib * @modules java.base/jdk.internal.module * @build JarUtils TestProvider TestClient * @run main SecurityProviderModularTest CL true diff --git a/test/jdk/java/util/ServiceLoader/ModulesTest.java b/test/jdk/java/util/ServiceLoader/ModulesTest.java --- a/test/jdk/java/util/ServiceLoader/ModulesTest.java +++ b/test/jdk/java/util/ServiceLoader/ModulesTest.java @@ -24,7 +24,7 @@ /** * @test * @modules java.scripting - * @library modules /lib/testlibrary + * @library modules /test/lib * @build bananascript/* * @build JarUtils * @compile classpath/pearscript/org/pear/PearScriptEngineFactory.java diff --git a/test/jdk/java/util/ServiceLoader/basic/ServiceLoaderBasicTest.java b/test/jdk/java/util/ServiceLoader/basic/ServiceLoaderBasicTest.java --- a/test/jdk/java/util/ServiceLoader/basic/ServiceLoaderBasicTest.java +++ b/test/jdk/java/util/ServiceLoader/basic/ServiceLoaderBasicTest.java @@ -25,7 +25,7 @@ * @test * @bug 4640520 6354623 7198496 * @summary Unit test for java.util.ServiceLoader - * @library /lib/testlibrary /test/lib + * @library /test/lib * @build JarUtils jdk.test.lib.process.* * Basic Load FooService FooProvider1 FooProvider2 FooProvider3 BarProvider * @run testng ServiceLoaderBasicTest diff --git a/test/jdk/javax/security/auth/login/modules/JaasModularClientTest.java b/test/jdk/javax/security/auth/login/modules/JaasModularClientTest.java --- a/test/jdk/javax/security/auth/login/modules/JaasModularClientTest.java +++ b/test/jdk/javax/security/auth/login/modules/JaasModularClientTest.java @@ -43,7 +43,7 @@ * @test * @bug 8078813 8183310 * @summary Test custom JAAS login module with all possible modular option. - * @library /lib/testlibrary /test/lib + * @library /test/lib * @modules java.base/jdk.internal.module * @build JarUtils * @build TestLoginModule JaasClient diff --git a/test/jdk/javax/security/auth/login/modules/JaasModularDefaultHandlerTest.java b/test/jdk/javax/security/auth/login/modules/JaasModularDefaultHandlerTest.java --- a/test/jdk/javax/security/auth/login/modules/JaasModularDefaultHandlerTest.java +++ b/test/jdk/javax/security/auth/login/modules/JaasModularDefaultHandlerTest.java @@ -41,7 +41,7 @@ * @test * @bug 8151654 8183310 * @summary Test default callback handler with all possible modular option. - * @library /lib/testlibrary /test/lib + * @library /test/lib * @modules java.base/jdk.internal.module * @build JarUtils * @build TestCallbackHandler TestLoginModule JaasClientWithDefaultHandler diff --git a/test/jdk/jdk/modules/scenarios/automaticmodules/RunWithAutomaticModules.java b/test/jdk/jdk/modules/scenarios/automaticmodules/RunWithAutomaticModules.java --- a/test/jdk/jdk/modules/scenarios/automaticmodules/RunWithAutomaticModules.java +++ b/test/jdk/jdk/modules/scenarios/automaticmodules/RunWithAutomaticModules.java @@ -23,7 +23,7 @@ /** * @test - * @library /lib/testlibrary /test/lib + * @library /test/lib * @modules jdk.compiler * java.scripting * jdk.zipfs diff --git a/test/jdk/sun/net/www/protocol/jar/jarbug/TestDriver.java b/test/jdk/sun/net/www/protocol/jar/jarbug/TestDriver.java --- a/test/jdk/sun/net/www/protocol/jar/jarbug/TestDriver.java +++ b/test/jdk/sun/net/www/protocol/jar/jarbug/TestDriver.java @@ -25,7 +25,6 @@ * @test * @bug 4361044 4388202 4418643 4523159 4730642 * @library /test/lib - * /lib/testlibrary * @modules jdk.compiler * @build jdk.test.lib.compiler.CompilerUtils * jdk.test.lib.Utils diff --git a/test/jdk/tools/jlink/basic/BasicTest.java b/test/jdk/tools/jlink/basic/BasicTest.java --- a/test/jdk/tools/jlink/basic/BasicTest.java +++ b/test/jdk/tools/jlink/basic/BasicTest.java @@ -25,7 +25,7 @@ * @test * @summary Basic test of jlink to create jmods and images * @author Andrei Eremeev - * @library /lib/testlibrary /test/lib + * @library /test/lib * @modules java.base/jdk.internal.module * jdk.jlink * jdk.compiler diff --git a/test/jdk/tools/launcher/modules/addexports/manifest/AddExportsAndOpensInManifest.java b/test/jdk/tools/launcher/modules/addexports/manifest/AddExportsAndOpensInManifest.java --- a/test/jdk/tools/launcher/modules/addexports/manifest/AddExportsAndOpensInManifest.java +++ b/test/jdk/tools/launcher/modules/addexports/manifest/AddExportsAndOpensInManifest.java @@ -23,10 +23,9 @@ /** * @test - * @library /lib/testlibrary * @library /test/lib * @modules jdk.compiler - * @build AddExportsAndOpensInManifest Test2 JarUtils jdk.testlibrary.* + * @build AddExportsAndOpensInManifest Test2 JarUtils * @compile --add-exports=java.base/jdk.internal.misc=ALL-UNNAMED Test1.java * @run testng AddExportsAndOpensInManifest * @summary Basic test for Add-Exports and Add-Opens attributes in the diff --git a/test/jdk/tools/launcher/modules/addreads/AddReadsTest.java b/test/jdk/tools/launcher/modules/addreads/AddReadsTest.java --- a/test/jdk/tools/launcher/modules/addreads/AddReadsTest.java +++ b/test/jdk/tools/launcher/modules/addreads/AddReadsTest.java @@ -23,7 +23,7 @@ /** * @test - * @library /lib/testlibrary /test/lib + * @library /test/lib * @modules jdk.compiler * @build AddReadsTest JarUtils * jdk.test.lib.compiler.CompilerUtils diff --git a/test/jdk/tools/launcher/modules/illegalaccess/IllegalAccessTest.java b/test/jdk/tools/launcher/modules/illegalaccess/IllegalAccessTest.java --- a/test/jdk/tools/launcher/modules/illegalaccess/IllegalAccessTest.java +++ b/test/jdk/tools/launcher/modules/illegalaccess/IllegalAccessTest.java @@ -26,7 +26,7 @@ * @requires vm.compMode != "Xcomp" * @modules java.base/jdk.internal.misc * java.base/sun.security.x509 - * @library /test/lib /lib/testlibrary modules + * @library /test/lib modules * @build IllegalAccessTest TryAccess JarUtils * jdk.test.lib.compiler.CompilerUtils * @build m/* diff --git a/test/jdk/tools/launcher/modules/patch/basic/PatchTest.java b/test/jdk/tools/launcher/modules/patch/basic/PatchTest.java --- a/test/jdk/tools/launcher/modules/patch/basic/PatchTest.java +++ b/test/jdk/tools/launcher/modules/patch/basic/PatchTest.java @@ -23,7 +23,7 @@ /** * @test - * @library /lib/testlibrary /test/lib + * @library /test/lib * @modules jdk.compiler * jdk.naming.dns * @build PatchTest JarUtils diff --git a/test/jdk/tools/launcher/modules/patch/basic/PatchTestWarningError.java b/test/jdk/tools/launcher/modules/patch/basic/PatchTestWarningError.java --- a/test/jdk/tools/launcher/modules/patch/basic/PatchTestWarningError.java +++ b/test/jdk/tools/launcher/modules/patch/basic/PatchTestWarningError.java @@ -25,7 +25,7 @@ * @test * @bug 8168836 * @summary Basic argument validation for --patch-module - * @library /lib/testlibrary /test/lib + * @library /test/lib * @modules jdk.compiler * @build PatchTestWarningError JarUtils * jdk.test.lib.compiler.CompilerUtils diff --git a/test/jdk/tools/launcher/modules/validate/ValidateModulesTest.java b/test/jdk/tools/launcher/modules/validate/ValidateModulesTest.java --- a/test/jdk/tools/launcher/modules/validate/ValidateModulesTest.java +++ b/test/jdk/tools/launcher/modules/validate/ValidateModulesTest.java @@ -25,7 +25,7 @@ * @test * @bug 8178380 8194937 * @modules java.xml - * @library src /lib/testlibrary /test/lib + * @library src /test/lib * @build ValidateModulesTest hello/* JarUtils * @run testng ValidateModulesTest * @summary Basic test for java --validate-modules diff --git a/test/jdk/lib/testlibrary/JarUtils.java b/test/lib/JarUtils.java rename from test/jdk/lib/testlibrary/JarUtils.java rename to test/lib/JarUtils.java --- a/test/jdk/lib/testlibrary/JarUtils.java +++ b/test/lib/JarUtils.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2015, 2018, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it