Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2019, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2019, 2023, 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
Expand All @@ -21,7 +21,7 @@
* questions.
*/

import jdk.internal.module.ModuleInfoWriter;
import jdk.test.lib.util.ModuleInfoWriter;

import java.io.File;
import java.io.IOException;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2015, 2019, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2015, 2023, 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
Expand Down Expand Up @@ -34,14 +34,16 @@
* @test
* @bug 8221730
* @summary Test of diagnostic command VM.version (tests all DCMD executors)
* @library /test/lib
* /vmTestbase
* @requires vm.flagless
* @modules java.base/jdk.internal.misc
* @modules java.base/jdk.internal.org.objectweb.asm
* java.base/jdk.internal.org.objectweb.asm.commons
* java.base/jdk.internal.misc
* java.base/jdk.internal.module
* java.compiler
* java.management
* jdk.internal.jvmstat/sun.jvmstat.monitor
* @library /test/lib
* /vmTestbase
* @requires vm.flagless
* @run testng/othervm -XX:+UsePerfData VMVersionTest
*/
public class VMVersionTest {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2017, 2018, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2017, 2023, 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
Expand All @@ -26,9 +26,12 @@
* @bug 8168423
* @summary Different types of ClassLoader running with(out) SecurityManager and
* (in)valid security policy file.
* @modules java.base/jdk.internal.org.objectweb.asm
* java.base/jdk.internal.org.objectweb.asm.commons
* java.base/jdk.internal.module
* @library /test/lib
* @modules java.base/jdk.internal.module
* @build jdk.test.lib.util.JarUtils
* jdk.test.lib.util.ModuleInfoWriter
* @build TestClassLoader TestClient
* @run main ClassLoaderTest -noPolicy
* @run main ClassLoaderTest -validPolicy
Expand All @@ -48,9 +51,9 @@
import java.util.Collections;
import java.util.LinkedList;
import java.util.List;
import jdk.internal.module.ModuleInfoWriter;
import jdk.test.lib.process.ProcessTools;
import jdk.test.lib.util.JarUtils;
import jdk.test.lib.util.ModuleInfoWriter;

public class ClassLoaderTest {

Expand Down
6 changes: 4 additions & 2 deletions test/jdk/java/lang/ModuleTests/AnnotationsTest.java
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2016, 2020, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2016, 2023, 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
Expand Down Expand Up @@ -36,14 +36,14 @@
import java.util.List;
import java.util.Set;

import jdk.internal.module.ModuleInfoWriter;
import jdk.internal.org.objectweb.asm.AnnotationVisitor;
import jdk.internal.org.objectweb.asm.Attribute;
import jdk.internal.org.objectweb.asm.ClassReader;
import jdk.internal.org.objectweb.asm.ClassVisitor;
import jdk.internal.org.objectweb.asm.ClassWriter;
import jdk.internal.org.objectweb.asm.Opcodes;
import jdk.internal.org.objectweb.asm.commons.ModuleTargetAttribute;
import jdk.test.lib.util.ModuleInfoWriter;

import org.testng.annotations.Test;
import static org.testng.Assert.*;
Expand All @@ -53,6 +53,8 @@
* @modules java.base/jdk.internal.org.objectweb.asm
* java.base/jdk.internal.org.objectweb.asm.commons
* java.base/jdk.internal.module
* @library /test/lib
* @build jdk.test.lib.util.ModuleInfoWriter
* @run testng AnnotationsTest
* @summary Basic test of annotations on modules
*/
Expand Down
10 changes: 7 additions & 3 deletions test/jdk/java/lang/module/ClassFileVersionsTest.java
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2017, 2021, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2017, 2023, 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
Expand All @@ -23,7 +23,11 @@

/**
* @test
* @modules java.base/jdk.internal.module
* @modules java.base/jdk.internal.org.objectweb.asm
* java.base/jdk.internal.org.objectweb.asm.commons
* java.base/jdk.internal.module
* @library /test/lib
* @build jdk.test.lib.util.ModuleInfoWriter
* @run testng ClassFileVersionsTest
* @summary Test parsing of module-info.class with different class file versions
*/
Expand All @@ -36,7 +40,7 @@

import static java.lang.module.ModuleDescriptor.Requires.Modifier.*;

import jdk.internal.module.ModuleInfoWriter;
import jdk.test.lib.util.ModuleInfoWriter;

import org.testng.annotations.DataProvider;
import org.testng.annotations.Test;
Expand Down
9 changes: 6 additions & 3 deletions test/jdk/java/lang/module/ConfigurationTest.java
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2014, 2020, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2014, 2023, 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
Expand All @@ -23,10 +23,13 @@

/**
* @test
* @library /test/lib
* @modules java.base/jdk.internal.access
* java.base/jdk.internal.org.objectweb.asm
* java.base/jdk.internal.org.objectweb.asm.commons
* java.base/jdk.internal.module
* @library /test/lib
* @build ConfigurationTest
* jdk.test.lib.util.ModuleInfoWriter
* jdk.test.lib.util.ModuleUtils
* @run testng ConfigurationTest
* @summary Basic tests for java.lang.module.Configuration
Expand All @@ -47,10 +50,10 @@
import java.util.List;
import java.util.Set;

import jdk.test.lib.util.ModuleInfoWriter;
import jdk.test.lib.util.ModuleUtils;

import jdk.internal.access.SharedSecrets;
import jdk.internal.module.ModuleInfoWriter;
import jdk.internal.module.ModuleTarget;
import org.testng.annotations.DataProvider;
import org.testng.annotations.Test;
Expand Down
8 changes: 6 additions & 2 deletions test/jdk/java/lang/module/ModuleDescriptorTest.java
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2013, 2018, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2013, 2023, 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
Expand All @@ -24,7 +24,11 @@
/**
* @test
* @modules java.base/jdk.internal.access
* java.base/jdk.internal.org.objectweb.asm
* java.base/jdk.internal.org.objectweb.asm.commons
* java.base/jdk.internal.module
* @library /test/lib
* @build jdk.test.lib.util.ModuleInfoWriter
* @run testng ModuleDescriptorTest
* @summary Basic test for java.lang.module.ModuleDescriptor and its builder
*/
Expand Down Expand Up @@ -56,7 +60,7 @@

import jdk.internal.access.JavaLangModuleAccess;
import jdk.internal.access.SharedSecrets;
import jdk.internal.module.ModuleInfoWriter;
import jdk.test.lib.util.ModuleInfoWriter;
import org.testng.annotations.DataProvider;
import org.testng.annotations.Test;
import static org.testng.Assert.*;
Expand Down
11 changes: 7 additions & 4 deletions test/jdk/java/lang/module/ModuleFinderTest.java
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2015, 2023, 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
Expand All @@ -23,8 +23,11 @@

/**
* @test
* @modules java.base/jdk.internal.module
* @build ModuleFinderTest
* @modules java.base/jdk.internal.org.objectweb.asm
* java.base/jdk.internal.org.objectweb.asm.commons
* java.base/jdk.internal.module
* @library /test/lib
* @build ModuleFinderTest jdk.test.lib.util.ModuleInfoWriter
* @run testng ModuleFinderTest
* @summary Basic tests for java.lang.module.ModuleFinder
*/
Expand All @@ -45,7 +48,7 @@
import java.util.jar.JarOutputStream;
import java.util.stream.Collectors;

import jdk.internal.module.ModuleInfoWriter;
import jdk.test.lib.util.ModuleInfoWriter;

import org.testng.annotations.Test;
import static org.testng.Assert.*;
Expand Down
9 changes: 7 additions & 2 deletions test/jdk/java/lang/module/ModuleNamesTest.java
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2016, 2023, 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
Expand All @@ -24,7 +24,11 @@
/**
* @test
* @modules java.base/jdk.internal.access
* java.base/jdk.internal.org.objectweb.asm
* java.base/jdk.internal.org.objectweb.asm.commons
* java.base/jdk.internal.module
* @library /test/lib
* @build jdk.test.lib.util.ModuleInfoWriter
* @run testng ModuleNamesTest
* @summary Basic test of reading a module-info.class with module names that
* are legal in class files but not legal in the Java Language
Expand All @@ -42,7 +46,8 @@
import java.util.Set;

import jdk.internal.access.SharedSecrets;
import jdk.internal.module.ModuleInfoWriter;

import jdk.test.lib.util.ModuleInfoWriter;

import org.testng.annotations.DataProvider;
import org.testng.annotations.Test;
Expand Down
12 changes: 8 additions & 4 deletions test/jdk/java/lang/module/MultiReleaseJarTest.java
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2016, 2017, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2016, 2023, 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
Expand All @@ -23,9 +23,13 @@

/**
* @test
* @modules java.base/jdk.internal.org.objectweb.asm
* java.base/jdk.internal.org.objectweb.asm.commons
* java.base/jdk.internal.module
* @library /test/lib
* @modules java.base/jdk.internal.module
* @build MultiReleaseJarTest jdk.test.lib.util.JarUtils
* @build MultiReleaseJarTest
* jdk.test.lib.util.JarUtils
* jdk.test.lib.util.ModuleInfoWriter
* @run testng MultiReleaseJarTest
* @run testng/othervm -Djdk.util.jar.enableMultiRelease=false MultiReleaseJarTest
* @summary Basic test of modular JARs as multi-release JARs
Expand Down Expand Up @@ -54,7 +58,7 @@
import java.util.jar.Attributes;
import java.util.jar.Manifest;

import jdk.internal.module.ModuleInfoWriter;
import jdk.test.lib.util.ModuleInfoWriter;
import jdk.test.lib.util.JarUtils;

import org.testng.annotations.Test;
Expand Down
13 changes: 8 additions & 5 deletions test/jdk/java/security/Provider/SecurityProviderModularTest.java
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2015, 2017, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2015, 2023, 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
Expand Down Expand Up @@ -38,19 +38,22 @@
import java.io.OutputStream;
import java.lang.module.ModuleDescriptor;
import java.lang.module.ModuleDescriptor.Builder;
import jdk.internal.module.ModuleInfoWriter;
import jdk.test.lib.process.ProcessTools;
import jdk.test.lib.util.JarUtils;

import jdk.test.lib.util.ModuleInfoWriter;

/*
* @test
* @bug 8130360 8183310
* @summary Test security provider in different combination of modular option
* defined with(out) service description.
* @modules java.base/jdk.internal.org.objectweb.asm
* java.base/jdk.internal.org.objectweb.asm.commons
* java.base/jdk.internal.module
* @library /test/lib
* @modules java.base/jdk.internal.module
* @build jdk.test.lib.util.JarUtils TestProvider TestClient
* @build jdk.test.lib.util.JarUtils
* jdk.test.lib.util.ModuleInfoWriter
* TestProvider TestClient
* @run main SecurityProviderModularTest CL true
* @run main SecurityProviderModularTest CL false
* @run main SecurityProviderModularTest SL true
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2015, 2017, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2015, 2023, 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
Expand Down Expand Up @@ -33,19 +33,21 @@
import java.io.OutputStream;
import java.lang.module.ModuleDescriptor;
import java.lang.module.ModuleDescriptor.Builder;
import jdk.internal.module.ModuleInfoWriter;
import java.util.stream.Stream;
import jdk.test.lib.process.ProcessTools;
import jdk.test.lib.process.OutputAnalyzer;
import jdk.test.lib.util.JarUtils;
import jdk.test.lib.util.ModuleInfoWriter;

/*
* @test
* @bug 8078813 8183310
* @summary Test custom JAAS login module with all possible modular option.
* @modules java.base/jdk.internal.org.objectweb.asm
* java.base/jdk.internal.org.objectweb.asm.commons
* java.base/jdk.internal.module
* @library /test/lib
* @modules java.base/jdk.internal.module
* @build jdk.test.lib.util.JarUtils
* @build jdk.test.lib.util.JarUtils jdk.test.lib.util.ModuleInfoWriter
* @build TestLoginModule JaasClient
* @run main JaasModularClientTest false
* @run main JaasModularClientTest true
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2016, 2017, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2016, 2023, 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
Expand Down Expand Up @@ -32,19 +32,21 @@
import java.io.OutputStream;
import java.lang.module.ModuleDescriptor;
import java.lang.module.ModuleDescriptor.Builder;
import jdk.internal.module.ModuleInfoWriter;
import java.util.stream.Stream;
import jdk.test.lib.process.ProcessTools;
import jdk.test.lib.process.OutputAnalyzer;
import jdk.test.lib.util.JarUtils;
import jdk.test.lib.util.ModuleInfoWriter;

/*
* @test
* @bug 8151654 8183310
* @summary Test default callback handler with all possible modular option.
* @modules java.base/jdk.internal.org.objectweb.asm
* java.base/jdk.internal.org.objectweb.asm.commons
* java.base/jdk.internal.module
* @library /test/lib
* @modules java.base/jdk.internal.module
* @build jdk.test.lib.util.JarUtils
* @build jdk.test.lib.util.JarUtils jdk.test.lib.util.ModuleInfoWriter
* @build TestCallbackHandler TestLoginModule JaasClientWithDefaultHandler
* @run main JaasModularDefaultHandlerTest
*/
Expand Down
Loading