From a97dca52c9257121fc96613a4b591920c1c3e31a Mon Sep 17 00:00:00 2001
From: "Y. Srinivas Ramakrishna"
Date: Thu, 5 Dec 2024 19:46:39 +0000
Subject: [PATCH 01/89] 8344593: GenShen: Review of ReduceInitialCardMarks
Reviewed-by: shade, cslucas
---
.../gc/shenandoah/c2/shenandoahBarrierSetC2.cpp | 16 +++++++++++-----
.../share/gc/shenandoah/shenandoahBarrierSet.cpp | 8 ++++++++
.../share/gc/shenandoah/shenandoahBarrierSet.hpp | 14 +++++++++-----
3 files changed, 28 insertions(+), 10 deletions(-)
diff --git a/src/hotspot/share/gc/shenandoah/c2/shenandoahBarrierSetC2.cpp b/src/hotspot/share/gc/shenandoah/c2/shenandoahBarrierSetC2.cpp
index b906ae2ca0b..c6bcbd18a16 100644
--- a/src/hotspot/share/gc/shenandoah/c2/shenandoahBarrierSetC2.cpp
+++ b/src/hotspot/share/gc/shenandoah/c2/shenandoahBarrierSetC2.cpp
@@ -465,11 +465,17 @@ void ShenandoahBarrierSetC2::post_barrier(GraphKit* kit,
}
if (ReduceInitialCardMarks && obj == kit->just_allocated_object(kit->control())) {
- // We can skip marks on a freshly-allocated object in Eden.
- // Keep this code in sync with new_deferred_store_barrier() in runtime.cpp.
- // That routine informs GC to take appropriate compensating steps,
- // upon a slow-path allocation, so as to make this card-mark
- // elision safe.
+ // We use card marks to track old to young references in Generational Shenandoah;
+ // see flag ShenandoahCardBarrier above.
+ // Objects are always allocated in the young generation and initialized
+ // before they are promoted. There's always a safepoint (e.g. at final mark)
+ // before an object is promoted from young to old. Promotion entails dirtying of
+ // the cards backing promoted objects, so they will be guaranteed to be scanned
+ // at the next remembered set scan of the old generation.
+ // Thus, we can safely skip card-marking of initializing stores on a
+ // freshly-allocated object. If any of the assumptions above change in
+ // the future, this code will need to be re-examined; see check in
+ // ShenandoahCardBarrier::on_slowpath_allocation_exit().
return;
}
diff --git a/src/hotspot/share/gc/shenandoah/shenandoahBarrierSet.cpp b/src/hotspot/share/gc/shenandoah/shenandoahBarrierSet.cpp
index 38e363664dc..62067bccb1e 100644
--- a/src/hotspot/share/gc/shenandoah/shenandoahBarrierSet.cpp
+++ b/src/hotspot/share/gc/shenandoah/shenandoahBarrierSet.cpp
@@ -88,6 +88,14 @@ bool ShenandoahBarrierSet::need_keep_alive_barrier(DecoratorSet decorators, Basi
return (on_weak_ref || unknown) && keep_alive;
}
+void ShenandoahBarrierSet::on_slowpath_allocation_exit(JavaThread* thread, oop new_obj) {
+#if COMPILER2_OR_JVMCI
+ assert(!ReduceInitialCardMarks || !ShenandoahCardBarrier || ShenandoahGenerationalHeap::heap()->is_in_young(new_obj),
+ "Error: losing card mark on initialzing store to old gen");
+#endif // COMPILER2_OR_JVMCI
+ assert(thread->deferred_card_mark().is_empty(), "We don't use this");
+}
+
void ShenandoahBarrierSet::on_thread_create(Thread* thread) {
// Create thread local data
ShenandoahThreadLocalData::create(thread);
diff --git a/src/hotspot/share/gc/shenandoah/shenandoahBarrierSet.hpp b/src/hotspot/share/gc/shenandoah/shenandoahBarrierSet.hpp
index 8d1dc92761a..0d38cc757f4 100644
--- a/src/hotspot/share/gc/shenandoah/shenandoahBarrierSet.hpp
+++ b/src/hotspot/share/gc/shenandoah/shenandoahBarrierSet.hpp
@@ -77,17 +77,21 @@ class ShenandoahBarrierSet: public BarrierSet {
return (decorators & IN_NATIVE) != 0;
}
- void print_on(outputStream* st) const;
+ void print_on(outputStream* st) const override;
template
inline void arraycopy_barrier(T* src, T* dst, size_t count);
inline void clone_barrier(oop src);
void clone_barrier_runtime(oop src);
- virtual void on_thread_create(Thread* thread);
- virtual void on_thread_destroy(Thread* thread);
- virtual void on_thread_attach(Thread* thread);
- virtual void on_thread_detach(Thread* thread);
+ // Support for optimizing compilers to call the barrier set on slow path allocations
+ // that did not enter a TLAB. Used for e.g. ReduceInitialCardMarks to take any
+ // compensating actions to restore card-marks that might otherwise be incorrectly elided.
+ void on_slowpath_allocation_exit(JavaThread* thread, oop new_obj) override;
+ void on_thread_create(Thread* thread) override;
+ void on_thread_destroy(Thread* thread) override;
+ void on_thread_attach(Thread* thread) override;
+ void on_thread_detach(Thread* thread) override;
static inline oop resolve_forwarded_not_null(oop p);
static inline oop resolve_forwarded_not_null_mutator(oop p);
From bf0debc023a42ccdf2f589039e4d98e11424b4dd Mon Sep 17 00:00:00 2001
From: Matias Saavedra Silva
Date: Thu, 5 Dec 2024 20:08:31 +0000
Subject: [PATCH 02/89] 8343890: SEGV crash in RunTimeClassInfo::klass
Reviewed-by: iklam, ccheung
---
src/hotspot/share/cds/runTimeClassInfo.cpp | 9 ++++++---
1 file changed, 6 insertions(+), 3 deletions(-)
diff --git a/src/hotspot/share/cds/runTimeClassInfo.cpp b/src/hotspot/share/cds/runTimeClassInfo.cpp
index 0acd89b5bce..e2d41cd1de2 100644
--- a/src/hotspot/share/cds/runTimeClassInfo.cpp
+++ b/src/hotspot/share/cds/runTimeClassInfo.cpp
@@ -76,10 +76,13 @@ void RunTimeClassInfo::init(DumpTimeClassInfo& info) {
}
InstanceKlass* RunTimeClassInfo::klass() const {
- if (ArchiveBuilder::is_active() && ArchiveBuilder::current()->is_in_buffer_space((address)this)) {
- return ArchiveBuilder::current()->offset_to_buffered(_klass_offset);
- } else {
+ if (MetaspaceShared::is_in_shared_metaspace(this)) {
+ // is inside a mmaped CDS archive.
return ArchiveUtils::offset_to_archived_address(_klass_offset);
+ } else {
+ // is a temporary copy of a RunTimeClassInfo that's being initialized
+ // by the ArchiveBuilder.
+ return ArchiveBuilder::current()->offset_to_buffered(_klass_offset);
}
}
From 5f30a8d90cbc3f163e2328cda5a9eb6ad0f1787a Mon Sep 17 00:00:00 2001
From: Magnus Ihse Bursie
Date: Thu, 5 Dec 2024 21:53:18 +0000
Subject: [PATCH 03/89] 8345424: Move FindDebuginfoFiles out of FileUtils.gmk
Reviewed-by: erikj
---
make/Images.gmk | 1 +
make/StaticLibs.gmk | 1 +
make/common/DebugInfoUtils.gmk | 58 ++++++++++++++++++++++++++++++++++
make/common/FileUtils.gmk | 23 --------------
4 files changed, 60 insertions(+), 23 deletions(-)
create mode 100644 make/common/DebugInfoUtils.gmk
diff --git a/make/Images.gmk b/make/Images.gmk
index 5f987a2f71a..c5d0ef11b5d 100644
--- a/make/Images.gmk
+++ b/make/Images.gmk
@@ -29,6 +29,7 @@ include $(SPEC)
include MakeBase.gmk
include CopyFiles.gmk
+include DebugInfoUtils.gmk
include Execute.gmk
include Modules.gmk
include Utils.gmk
diff --git a/make/StaticLibs.gmk b/make/StaticLibs.gmk
index 78918c456ee..cfca2a77411 100644
--- a/make/StaticLibs.gmk
+++ b/make/StaticLibs.gmk
@@ -29,6 +29,7 @@ include $(SPEC)
include MakeBase.gmk
include CopyFiles.gmk
+include DebugInfoUtils.gmk
include Modules.gmk
include modules/LauncherCommon.gmk
diff --git a/make/common/DebugInfoUtils.gmk b/make/common/DebugInfoUtils.gmk
new file mode 100644
index 00000000000..69d6c24b5e0
--- /dev/null
+++ b/make/common/DebugInfoUtils.gmk
@@ -0,0 +1,58 @@
+#
+# Copyright (c) 2024, 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. Oracle designates this
+# particular file as subject to the "Classpath" exception as provided
+# by Oracle in the LICENSE file that accompanied this code.
+#
+# 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.
+#
+
+ifeq ($(_MAKEBASE_GMK), )
+ $(error You must include MakeBase.gmk prior to including DebugInfoUtils.gmk)
+endif
+
+################################################################################
+#
+# Common debuginfo utility functions
+#
+################################################################################
+
+################################################################################
+# Find native debuginfo files in a directory
+#
+# Param 1 - dir to find debuginfo files in
+FindDebuginfoFiles = \
+ $(wildcard $(addprefix $1/*, $(DEBUGINFO_SUFFIXES)) \
+ $(addprefix $1/*/*, $(DEBUGINFO_SUFFIXES)) \
+ $(addprefix $1/*/*/*, $(DEBUGINFO_SUFFIXES)))
+
+# Pick the correct debug info files to copy, either zipped or not.
+ifeq ($(ZIP_EXTERNAL_DEBUG_SYMBOLS), true)
+ DEBUGINFO_SUFFIXES += .diz
+else
+ DEBUGINFO_SUFFIXES := .debuginfo .pdb .map
+ # On Macosx, if debug symbols have not been zipped, find all files inside *.dSYM
+ # dirs.
+ ifeq ($(call isTargetOs, macosx), true)
+ $(call FillFindCache, \
+ $(SUPPORT_OUTPUTDIR)/modules_libs $(SUPPORT_OUTPUTDIR)/modules_cmds)
+ FindDebuginfoFiles = \
+ $(if $(wildcard $1), $(call containing, .dSYM/, $(call FindFiles, $1)))
+ endif
+endif
diff --git a/make/common/FileUtils.gmk b/make/common/FileUtils.gmk
index d546ab94a58..d3cc4872ebb 100644
--- a/make/common/FileUtils.gmk
+++ b/make/common/FileUtils.gmk
@@ -307,26 +307,3 @@ ifeq ($(DISABLE_CACHE_FIND), true)
else
FindFiles = $(CacheFindFiles)
endif
-
-# Find native debuginfo files in a directory
-#
-# Param 1 - dir to find debuginfo files in
-FindDebuginfoFiles = \
- $(wildcard $(addprefix $1/*, $(DEBUGINFO_SUFFIXES)) \
- $(addprefix $1/*/*, $(DEBUGINFO_SUFFIXES)) \
- $(addprefix $1/*/*/*, $(DEBUGINFO_SUFFIXES)))
-
-# Pick the correct debug info files to copy, either zipped or not.
-ifeq ($(ZIP_EXTERNAL_DEBUG_SYMBOLS), true)
- DEBUGINFO_SUFFIXES += .diz
-else
- DEBUGINFO_SUFFIXES := .debuginfo .pdb .map
- # On Macosx, if debug symbols have not been zipped, find all files inside *.dSYM
- # dirs.
- ifeq ($(call isTargetOs, macosx), true)
- $(call FillFindCache, \
- $(SUPPORT_OUTPUTDIR)/modules_libs $(SUPPORT_OUTPUTDIR)/modules_cmds)
- FindDebuginfoFiles = \
- $(if $(wildcard $1), $(call containing, .dSYM/, $(call FindFiles, $1)))
- endif
-endif
From 6f6bce56fc95832a07ef9bfc6a4770b76440af09 Mon Sep 17 00:00:00 2001
From: Magnus Ihse Bursie
Date: Thu, 5 Dec 2024 21:53:36 +0000
Subject: [PATCH 04/89] 8344559: Log is spammed by missing pandoc warnings when
building man pages
Reviewed-by: shade, erikj
---
doc/building.html | 10 +++++-----
doc/building.md | 6 +++---
make/autoconf/jdk-options.m4 | 4 ++--
make/common/modules/LauncherCommon.gmk | 4 +---
4 files changed, 11 insertions(+), 13 deletions(-)
diff --git a/doc/building.html b/doc/building.html
index cd73863f879..7157848f561 100644
--- a/doc/building.html
+++ b/doc/building.html
@@ -863,12 +863,12 @@
GNU Bash
are supported.
At least version 3.2 of GNU Bash must be used.
Graphviz and Pandoc
-
In order to build the full docs (see the
+
In order to build man pages and the full docs (see the
--enable-full-docs configure option) Graphviz and Pandoc are required. Any recent versions
-should work. For reference, and subject to change, Oracle builds use
-Graphviz 9.0.0 and Pandoc 2.19.2.
+href="https://pandoc.org">Pandoc is required. For full docs also Graphviz is required. Any recent
+versions should work. For reference, and subject to change, Oracle
+builds use Graphviz 9.0.0 and Pandoc 2.19.2.
Running Configure
To build the JDK, you need a "configuration", which consists of a
directory where to store the build output, coupled with information
diff --git a/doc/building.md b/doc/building.md
index 99bc509dc70..04db6e94d1c 100644
--- a/doc/building.md
+++ b/doc/building.md
@@ -680,9 +680,9 @@ At least version 3.2 of GNU Bash must be used.
### Graphviz and Pandoc
-In order to build the full docs (see the `--enable-full-docs`
-configure option) [Graphviz](https://www.graphviz.org) and
-[Pandoc](https://pandoc.org) are required. Any recent versions should
+In order to build man pages and the full docs (see the `--enable-full-docs`
+configure option) [Pandoc](https://pandoc.org) is required. For full docs also
+[Graphviz](https://www.graphviz.org) is required. Any recent versions should
work. For reference, and subject to change, Oracle builds use Graphviz
9.0.0 and Pandoc 2.19.2.
diff --git a/make/autoconf/jdk-options.m4 b/make/autoconf/jdk-options.m4
index 61638ce5a2c..c09f581688c 100644
--- a/make/autoconf/jdk-options.m4
+++ b/make/autoconf/jdk-options.m4
@@ -121,7 +121,7 @@ AC_DEFUN_ONCE([JDKOPT_SETUP_JDK_OPTIONS],
if test "x$DOT" != "x"; then
AC_MSG_RESULT([yes])
else
- AC_MSG_RESULT([no, cannot generate full docs])
+ AC_MSG_RESULT([no, cannot generate full docs or man pages])
FULL_DOCS_AVAILABLE=false
fi
@@ -129,7 +129,7 @@ AC_DEFUN_ONCE([JDKOPT_SETUP_JDK_OPTIONS],
if test "x$ENABLE_PANDOC" = "xtrue"; then
AC_MSG_RESULT([yes])
else
- AC_MSG_RESULT([no, cannot generate full docs])
+ AC_MSG_RESULT([no, cannot generate full docs or man pages])
FULL_DOCS_AVAILABLE=false
fi
diff --git a/make/common/modules/LauncherCommon.gmk b/make/common/modules/LauncherCommon.gmk
index 77f39457b4c..98e110a0a86 100644
--- a/make/common/modules/LauncherCommon.gmk
+++ b/make/common/modules/LauncherCommon.gmk
@@ -192,9 +192,7 @@ ifeq ($(call isTargetOsType, unix)+$(MAKEFILE_PREFIX), true+Launcher)
MAN_FILES_MD := $(wildcard $(addsuffix /*.md, $(call FindModuleManDirs, $(MODULE))))
ifneq ($(MAN_FILES_MD), )
- ifeq ($(ENABLE_PANDOC), false)
- $(info Warning: pandoc not found. Not generating man pages)
- else
+ ifeq ($(ENABLE_PANDOC), true)
# Create dynamic man pages from markdown using pandoc. We need
# PANDOC_TROFF_MANPAGE_FILTER, a wrapper around
# PANDOC_TROFF_MANPAGE_FILTER_JAVASCRIPT. This is created by buildtools-jdk.
From daa2ba52a3197924c34ccdd0c33703e61cdc8350 Mon Sep 17 00:00:00 2001
From: Magnus Ihse Bursie
Date: Thu, 5 Dec 2024 21:53:53 +0000
Subject: [PATCH 05/89] 8339622: Regression in make open-hotspot-xcode-project
Reviewed-by: mcimadamore, erikj
---
make/ide/xcode/hotspot/CreateXcodeProject.gmk | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/make/ide/xcode/hotspot/CreateXcodeProject.gmk b/make/ide/xcode/hotspot/CreateXcodeProject.gmk
index db8f7f401ef..1f92ba0716f 100644
--- a/make/ide/xcode/hotspot/CreateXcodeProject.gmk
+++ b/make/ide/xcode/hotspot/CreateXcodeProject.gmk
@@ -42,7 +42,7 @@ ifeq ($(call isTargetOs, macosx), true)
PROJECT_FILE_NAME := hotspot.xcodeproj
COMPILE_COMMAND_FILE := $(OUTPUTDIR)/compile_commands.json
- LINKER_FLAGS_FILE := $(MAKESUPPORT_OUTPUTDIR)/compile-commands/jvm-ldflags.txt
+ LINKER_FLAGS_FILE := $(MAKESUPPORT_OUTPUTDIR)/compile-commands/LIBRARY_hotspot_variant-server_libjvm_libjvm-ldflags.txt
$(eval $(call SetupJavaCompilation, BUILD_PROJECT_CREATOR, \
TARGET_RELEASE := $(TARGET_RELEASE_BOOTJDK), \
@@ -60,7 +60,7 @@ ifeq ($(call isTargetOs, macosx), true)
XCODE_PROJ_DEBUG_OPTION := -d
endif
- XCODE_PROJ_VARDEPS := $(WORKSPACE_ROOT) $(IDE_OUTPUTDIR) \
+ XCODE_PROJ_VARDEPS := $(TOPDIR) $(IDE_OUTPUTDIR) \
$(PROJECT_MAKER_DIR)/data $(COMPILE_COMMAND_FILE) $(LINKER_FLAGS_FILE)
XCODE_PROJ_VARDEPS_FILE := $(call DependOnVariable, XCODE_PROJ_VARDEPS, \
$(TOOLS_OUTPUTDIR)/xcodeproj.vardeps)
@@ -70,7 +70,7 @@ ifeq ($(call isTargetOs, macosx), true)
DEPS := $(BUILD_PROJECT_CREATOR) $(COMPILE_COMMAND_FILE) \
$(LINKER_FLAGS_FILE) $(XCODE_PROJ_VARDEPS_FILE), \
OUTPUT_DIR := $(TOOLS_OUTPUTDIR), \
- COMMAND := $(PROJECT_CREATOR_TOOL) $(WORKSPACE_ROOT) $(IDE_OUTPUTDIR) \
+ COMMAND := $(PROJECT_CREATOR_TOOL) $(TOPDIR) $(IDE_OUTPUTDIR) \
$(PROJECT_MAKER_DIR)/data $(COMPILE_COMMAND_FILE) \
$(LINKER_FLAGS_FILE) $(XCODE_PROJ_DEBUG_OPTION), \
))
From 5da0eee3a6a50f3cffe843717aa07c88be59a4e1 Mon Sep 17 00:00:00 2001
From: Magnus Ihse Bursie
Date: Thu, 5 Dec 2024 22:57:06 +0000
Subject: [PATCH 06/89] 8285692: Enable _FORTIFY_SOURCE=2 when building with
Clang
Reviewed-by: erikj
---
make/autoconf/flags-cflags.m4 | 24 ++++++++----------------
1 file changed, 8 insertions(+), 16 deletions(-)
diff --git a/make/autoconf/flags-cflags.m4 b/make/autoconf/flags-cflags.m4
index 57654514eb6..f78ccfe3762 100644
--- a/make/autoconf/flags-cflags.m4
+++ b/make/autoconf/flags-cflags.m4
@@ -302,7 +302,7 @@ AC_DEFUN([FLAGS_SETUP_QUALITY_CHECKS],
AC_DEFUN([FLAGS_SETUP_OPTIMIZATION],
[
- if test "x$TOOLCHAIN_TYPE" = xgcc; then
+ if test "x$TOOLCHAIN_TYPE" = xgcc || test "x$TOOLCHAIN_TYPE" = xclang; then
C_O_FLAG_HIGHEST_JVM="-O3"
C_O_FLAG_HIGHEST="-O3"
C_O_FLAG_HI="-O3"
@@ -311,6 +311,13 @@ AC_DEFUN([FLAGS_SETUP_OPTIMIZATION],
C_O_FLAG_DEBUG="-O0"
C_O_FLAG_DEBUG_JVM="-O0"
C_O_FLAG_NONE="-O0"
+
+ if test "x$TOOLCHAIN_TYPE" = xclang && test "x$OPENJDK_TARGET_OS" = xaix; then
+ C_O_FLAG_HIGHEST_JVM="${C_O_FLAG_HIGHEST_JVM} -finline-functions"
+ C_O_FLAG_HIGHEST="${C_O_FLAG_HIGHEST} -finline-functions"
+ C_O_FLAG_HI="${C_O_FLAG_HI} -finline-functions"
+ fi
+
# -D_FORTIFY_SOURCE=2 hardening option needs optimization (at least -O1) enabled
# set for lower O-levels -U_FORTIFY_SOURCE to overwrite previous settings
if test "x$OPENJDK_TARGET_OS" = xlinux -a "x$DEBUG_LEVEL" = "xfastdebug"; then
@@ -331,21 +338,6 @@ AC_DEFUN([FLAGS_SETUP_OPTIMIZATION],
C_O_FLAG_DEBUG_JVM="${C_O_FLAG_DEBUG_JVM} ${DISABLE_FORTIFY_CFLAGS}"
C_O_FLAG_NONE="${C_O_FLAG_NONE} ${DISABLE_FORTIFY_CFLAGS}"
fi
- elif test "x$TOOLCHAIN_TYPE" = xclang; then
- if test "x$OPENJDK_TARGET_OS" = xaix; then
- C_O_FLAG_HIGHEST_JVM="-O3 -finline-functions"
- C_O_FLAG_HIGHEST="-O3 -finline-functions"
- C_O_FLAG_HI="-O3 -finline-functions"
- else
- C_O_FLAG_HIGHEST_JVM="-O3"
- C_O_FLAG_HIGHEST="-O3"
- C_O_FLAG_HI="-O3"
- fi
- C_O_FLAG_NORM="-O2"
- C_O_FLAG_DEBUG_JVM="-O0"
- C_O_FLAG_SIZE="-Os"
- C_O_FLAG_DEBUG="-O0"
- C_O_FLAG_NONE="-O0"
elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
C_O_FLAG_HIGHEST_JVM="-O2 -Oy-"
C_O_FLAG_HIGHEST="-O2"
From 41c8971cbcc1d281ffae907c952637ebff945ebb Mon Sep 17 00:00:00 2001
From: Magnus Ihse Bursie
Date: Thu, 5 Dec 2024 22:58:40 +0000
Subject: [PATCH 07/89] 8287122: Use gcc12 -ftrivial-auto-var-init=pattern in
debug builds
Reviewed-by: erikj
---
make/autoconf/flags-cflags.m4 | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/make/autoconf/flags-cflags.m4 b/make/autoconf/flags-cflags.m4
index f78ccfe3762..d208aff3de2 100644
--- a/make/autoconf/flags-cflags.m4
+++ b/make/autoconf/flags-cflags.m4
@@ -481,6 +481,11 @@ AC_DEFUN([FLAGS_SETUP_CFLAGS_HELPER],
else
DEBUG_CFLAGS_JDK="-DDEBUG"
+ if test "x$TOOLCHAIN_TYPE" = xgcc; then
+ DEBUG_CFLAGS_JDK="DEBUG_CFLAGS_JDK -ftrivial-auto-var-init=pattern"
+ DEBUG_CFLAGS_JVM="-ftrivial-auto-var-init=pattern"
+ fi
+
if test "x$TOOLCHAIN_TYPE" = xclang && test "x$OPENJDK_TARGET_OS" = xaix; then
DEBUG_CFLAGS_JVM="-fpic -mcmodel=large"
fi
From 9284602ecbbed94af38f90fd080684cdb33d5f31 Mon Sep 17 00:00:00 2001
From: David Holmes
Date: Fri, 6 Dec 2024 00:45:04 +0000
Subject: [PATCH 08/89] 8345628: [BACKOUT] JDK-8287122 Use gcc12
-ftrivial-auto-var-init=pattern in debug builds
Reviewed-by: erikj
---
make/autoconf/flags-cflags.m4 | 5 -----
1 file changed, 5 deletions(-)
diff --git a/make/autoconf/flags-cflags.m4 b/make/autoconf/flags-cflags.m4
index d208aff3de2..f78ccfe3762 100644
--- a/make/autoconf/flags-cflags.m4
+++ b/make/autoconf/flags-cflags.m4
@@ -481,11 +481,6 @@ AC_DEFUN([FLAGS_SETUP_CFLAGS_HELPER],
else
DEBUG_CFLAGS_JDK="-DDEBUG"
- if test "x$TOOLCHAIN_TYPE" = xgcc; then
- DEBUG_CFLAGS_JDK="DEBUG_CFLAGS_JDK -ftrivial-auto-var-init=pattern"
- DEBUG_CFLAGS_JVM="-ftrivial-auto-var-init=pattern"
- fi
-
if test "x$TOOLCHAIN_TYPE" = xclang && test "x$OPENJDK_TARGET_OS" = xaix; then
DEBUG_CFLAGS_JVM="-fpic -mcmodel=large"
fi
From aa3828447c4cbc1aae32c1b96d0d1831c5fb1cca Mon Sep 17 00:00:00 2001
From: Leonid Mesnik
Date: Fri, 6 Dec 2024 01:33:22 +0000
Subject: [PATCH 09/89] 8345435: Eliminate tier1_compiler_not_xcomp group
Reviewed-by: kvn
---
test/hotspot/jtreg/TEST.groups | 11 ++---------
.../profiling/TestMethodHandleInvokesIntrinsic.java | 3 ++-
.../profiling/TestMultiBranchDataOverflow.java | 3 ++-
.../profiling/TestProfileCounterOverflow.java | 2 ++
.../profiling/TestSharedHeadExceptionBackedges.java | 1 +
.../profiling/TestSpecTrapClassUnloading.java | 3 ++-
.../compiler/profiling/TestTypeProfileArgsLimit.java | 3 ++-
.../jtreg/compiler/profiling/TestTypeProfiling.java | 3 ++-
.../profiling/TestUnexpectedProfilingMismatch.java | 3 ++-
.../jtreg/compiler/profiling/UnsafeAccess.java | 3 ++-
.../profiling/spectrapredefineclass/Launcher.java | 1 +
.../spectrapredefineclass_classloaders/Launcher.java | 1 +
.../TestProfileConflictClassUnloading.java | 3 ++-
13 files changed, 23 insertions(+), 17 deletions(-)
diff --git a/test/hotspot/jtreg/TEST.groups b/test/hotspot/jtreg/TEST.groups
index 96743c4fe29..4803fca5847 100644
--- a/test/hotspot/jtreg/TEST.groups
+++ b/test/hotspot/jtreg/TEST.groups
@@ -38,10 +38,6 @@ hotspot_all_no_apps = \
hotspot_compiler = \
compiler
-hotspot_compiler_xcomp = \
- :hotspot_compiler \
- -:tier1_compiler_not_xcomp
-
hotspot_gc = \
gc
@@ -151,8 +147,7 @@ tier1_common = \
tier1_compiler = \
:tier1_compiler_1 \
:tier1_compiler_2 \
- :tier1_compiler_3 \
- :tier1_compiler_not_xcomp
+ :tier1_compiler_3
hotspot_not_fast_compiler = \
:hotspot_compiler \
@@ -210,6 +205,7 @@ tier1_compiler_3 = \
compiler/macronodes/ \
compiler/memoryinitialization/ \
compiler/osr/ \
+ compiler/profiling \
compiler/regalloc/ \
compiler/runtime/ \
compiler/startup/ \
@@ -269,9 +265,6 @@ tier3_compiler = \
-:tier1_compiler \
-:tier2_compiler
-tier1_compiler_not_xcomp = \
- compiler/profiling
-
ctw_1 = \
applications/ctw/modules/ \
-:ctw_2 \
diff --git a/test/hotspot/jtreg/compiler/profiling/TestMethodHandleInvokesIntrinsic.java b/test/hotspot/jtreg/compiler/profiling/TestMethodHandleInvokesIntrinsic.java
index 9ca1c13f03a..c5ec6264952 100644
--- a/test/hotspot/jtreg/compiler/profiling/TestMethodHandleInvokesIntrinsic.java
+++ b/test/hotspot/jtreg/compiler/profiling/TestMethodHandleInvokesIntrinsic.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, 2024, 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
@@ -26,6 +26,7 @@
* @bug 8041458
* @summary profiling of arguments in C1 at MethodHandle invoke of intrinsic tries to profile popped argument.
*
+ * @requires vm.compMode != "Xcomp"
* @run main/othervm -XX:-BackgroundCompilation -XX:-UseOnStackReplacement
* -XX:TieredStopAtLevel=3
* compiler.profiling.TestMethodHandleInvokesIntrinsic
diff --git a/test/hotspot/jtreg/compiler/profiling/TestMultiBranchDataOverflow.java b/test/hotspot/jtreg/compiler/profiling/TestMultiBranchDataOverflow.java
index 323cf213727..8d84fc4df38 100644
--- a/test/hotspot/jtreg/compiler/profiling/TestMultiBranchDataOverflow.java
+++ b/test/hotspot/jtreg/compiler/profiling/TestMultiBranchDataOverflow.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2020, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2020, 2024, 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
@@ -25,6 +25,7 @@
* @test
* @bug 8251458
* @summary Test int range overflow of MultiBranchData counter.
+ * @requires vm.compMode != "Xcomp"
* @run main/othervm -XX:CompileCommand=dontinline,compiler.profiling.TestMultiBranchDataOverflow::test
* -Xbatch -XX:Tier4BackEdgeThreshold=2147483647
* compiler.profiling.TestMultiBranchDataOverflow
diff --git a/test/hotspot/jtreg/compiler/profiling/TestProfileCounterOverflow.java b/test/hotspot/jtreg/compiler/profiling/TestProfileCounterOverflow.java
index a904192997e..b4c4d2d4a4a 100644
--- a/test/hotspot/jtreg/compiler/profiling/TestProfileCounterOverflow.java
+++ b/test/hotspot/jtreg/compiler/profiling/TestProfileCounterOverflow.java
@@ -1,4 +1,5 @@
/*
+ * Copyright (c) 2024, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2019, Loongson Technology Co. Ltd. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
@@ -25,6 +26,7 @@
* @test
* @bug 8224162
* @summary Profile counter for a call site may overflow.
+ * @requires vm.compMode != "Xcomp"
* @run main/othervm -Xbatch -XX:-UseOnStackReplacement -XX:+IgnoreUnrecognizedVMOptions -XX:MaxTrivialSize=0 -XX:C1MaxTrivialSize=0 compiler.profiling.TestProfileCounterOverflow
*/
diff --git a/test/hotspot/jtreg/compiler/profiling/TestSharedHeadExceptionBackedges.java b/test/hotspot/jtreg/compiler/profiling/TestSharedHeadExceptionBackedges.java
index e02df36fa1c..b3c95fa302b 100644
--- a/test/hotspot/jtreg/compiler/profiling/TestSharedHeadExceptionBackedges.java
+++ b/test/hotspot/jtreg/compiler/profiling/TestSharedHeadExceptionBackedges.java
@@ -25,6 +25,7 @@
* @test
* bug 8280842
* @summary Access violation in ciTypeFlow::profiled_count
+ * @requires vm.compMode != "Xcomp"
* @run main/othervm -XX:-BackgroundCompilation TestSharedHeadExceptionBackedges
*/
diff --git a/test/hotspot/jtreg/compiler/profiling/TestSpecTrapClassUnloading.java b/test/hotspot/jtreg/compiler/profiling/TestSpecTrapClassUnloading.java
index d713bf4d340..3f01d9ef2b6 100644
--- a/test/hotspot/jtreg/compiler/profiling/TestSpecTrapClassUnloading.java
+++ b/test/hotspot/jtreg/compiler/profiling/TestSpecTrapClassUnloading.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2014, 2018, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, 2024, 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
@@ -26,6 +26,7 @@
* @bug 8031752
* @summary speculative traps need to be cleaned up at GC
*
+ * @requires vm.compMode != "Xcomp"
* @run main/othervm -XX:+IgnoreUnrecognizedVMOptions -XX:-TieredCompilation
* -XX:-UseOnStackReplacement -XX:-BackgroundCompilation
* -XX:CompileThreshold=10000
diff --git a/test/hotspot/jtreg/compiler/profiling/TestTypeProfileArgsLimit.java b/test/hotspot/jtreg/compiler/profiling/TestTypeProfileArgsLimit.java
index a6d5da5a409..35804895307 100644
--- a/test/hotspot/jtreg/compiler/profiling/TestTypeProfileArgsLimit.java
+++ b/test/hotspot/jtreg/compiler/profiling/TestTypeProfileArgsLimit.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2023, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2023, 2024, 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
@@ -26,6 +26,7 @@
* @bug 8295406
* @summary Tests execution with TypeProfileArgsLimit=0 TypeProfileLevel=222.
*
+ * @requires vm.compMode != "Xcomp"
* @run main/othervm -XX:TypeProfileArgsLimit=0 -XX:TypeProfileLevel=222 compiler.profiling.TestTypeProfileArgsLimit
* @run main/othervm -XX:TypeProfileArgsLimit=0 -XX:TypeProfileLevel=212 compiler.profiling.TestTypeProfileArgsLimit
* @run main/othervm -XX:TypeProfileArgsLimit=0 -XX:TypeProfileLevel=202 compiler.profiling.TestTypeProfileArgsLimit
diff --git a/test/hotspot/jtreg/compiler/profiling/TestTypeProfiling.java b/test/hotspot/jtreg/compiler/profiling/TestTypeProfiling.java
index d5f5926bac0..849bc17ca95 100644
--- a/test/hotspot/jtreg/compiler/profiling/TestTypeProfiling.java
+++ b/test/hotspot/jtreg/compiler/profiling/TestTypeProfiling.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2018, 2023, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2018, 2024, 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
@@ -31,6 +31,7 @@
*
* @comment the test can't be run w/ TieredStopAtLevel < 4
* @requires vm.opt.TieredStopAtLevel == null | vm.opt.TieredStopAtLevel == 4
+ * @requires vm.compMode != "Xcomp"
*
* @library /test/lib /
* @build jdk.test.whitebox.WhiteBox
diff --git a/test/hotspot/jtreg/compiler/profiling/TestUnexpectedProfilingMismatch.java b/test/hotspot/jtreg/compiler/profiling/TestUnexpectedProfilingMismatch.java
index c0df67a1709..3bbf0a445e5 100644
--- a/test/hotspot/jtreg/compiler/profiling/TestUnexpectedProfilingMismatch.java
+++ b/test/hotspot/jtreg/compiler/profiling/TestUnexpectedProfilingMismatch.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 2024, 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
@@ -26,6 +26,7 @@
* @bug 8027631
* @summary profiling of arguments at calls cannot rely on signature of callee for types
*
+ * @requires vm.compMode != "Xcomp"
* @run main/othervm -XX:-BackgroundCompilation -XX:TieredStopAtLevel=3 -XX:TypeProfileLevel=111
* -XX:Tier3InvocationThreshold=200 -XX:Tier0InvokeNotifyFreqLog=7
* compiler.profiling.TestUnexpectedProfilingMismatch
diff --git a/test/hotspot/jtreg/compiler/profiling/UnsafeAccess.java b/test/hotspot/jtreg/compiler/profiling/UnsafeAccess.java
index b7b91e8615b..ef09de8d63b 100644
--- a/test/hotspot/jtreg/compiler/profiling/UnsafeAccess.java
+++ b/test/hotspot/jtreg/compiler/profiling/UnsafeAccess.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2016, 2024, 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
@@ -25,6 +25,7 @@
* @bug 8134918
* @modules java.base/jdk.internal.misc
*
+ * @requires vm.compMode != "Xcomp"
* @run main/bootclasspath/othervm -XX:+IgnoreUnrecognizedVMOptions -XX:TypeProfileLevel=222 -XX:+UseTypeSpeculation -Xbatch
* -XX:CompileCommand=dontinline,compiler.profiling.UnsafeAccess::test*
* compiler.profiling.UnsafeAccess
diff --git a/test/hotspot/jtreg/compiler/profiling/spectrapredefineclass/Launcher.java b/test/hotspot/jtreg/compiler/profiling/spectrapredefineclass/Launcher.java
index 1a8ed4c7893..bdf4b3fb852 100644
--- a/test/hotspot/jtreg/compiler/profiling/spectrapredefineclass/Launcher.java
+++ b/test/hotspot/jtreg/compiler/profiling/spectrapredefineclass/Launcher.java
@@ -28,6 +28,7 @@
* @modules java.base/jdk.internal.misc
* java.instrument
* @requires vm.jvmti & (vm.opt.TieredStopAtLevel == null | vm.opt.TieredStopAtLevel == 4)
+ * @requires vm.compMode != "Xcomp"
* @build compiler.profiling.spectrapredefineclass.Agent
* @run driver jdk.test.lib.helpers.ClassFileInstaller compiler.profiling.spectrapredefineclass.Agent
* @run driver compiler.profiling.spectrapredefineclass.Launcher
diff --git a/test/hotspot/jtreg/compiler/profiling/spectrapredefineclass_classloaders/Launcher.java b/test/hotspot/jtreg/compiler/profiling/spectrapredefineclass_classloaders/Launcher.java
index 08765e911c0..6fdbca00523 100644
--- a/test/hotspot/jtreg/compiler/profiling/spectrapredefineclass_classloaders/Launcher.java
+++ b/test/hotspot/jtreg/compiler/profiling/spectrapredefineclass_classloaders/Launcher.java
@@ -28,6 +28,7 @@
* @modules java.base/jdk.internal.misc
* java.instrument
* @requires vm.jvmti & (vm.opt.TieredStopAtLevel == null | vm.opt.TieredStopAtLevel == 4)
+ * @requires vm.compMode != "Xcomp"
* @build compiler.profiling.spectrapredefineclass_classloaders.Agent
* compiler.profiling.spectrapredefineclass_classloaders.Test
* compiler.profiling.spectrapredefineclass_classloaders.A
diff --git a/test/hotspot/jtreg/compiler/profiling/unloadingconflict/TestProfileConflictClassUnloading.java b/test/hotspot/jtreg/compiler/profiling/unloadingconflict/TestProfileConflictClassUnloading.java
index d68f5c012d0..daebd57c457 100644
--- a/test/hotspot/jtreg/compiler/profiling/unloadingconflict/TestProfileConflictClassUnloading.java
+++ b/test/hotspot/jtreg/compiler/profiling/unloadingconflict/TestProfileConflictClassUnloading.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 2024, 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
@@ -27,6 +27,7 @@
* @summary class unloading resets profile, method compiled after the profile is
* first set and before class loading sets unknown bit with not recorded class
* @library /
+ * @requires vm.compMode != "Xcomp"
* @build compiler.profiling.unloadingconflict.B
* @run main/othervm -XX:TypeProfileLevel=222 -XX:-BackgroundCompilation
* compiler.profiling.unloadingconflict.TestProfileConflictClassUnloading
From 84032850dbe3add7b7c8d6a4b2fbd5d5cab4483a Mon Sep 17 00:00:00 2001
From: Prasanta Sadhukhan
Date: Fri, 6 Dec 2024 03:19:13 +0000
Subject: [PATCH 10/89] 8268145: [macos] Rendering artifacts is seen when text
inside the JTable with TableCellEditor having JTextfield
Reviewed-by: kizune, abhiscxk, honkar
---
.../classes/com/apple/laf/AquaCaret.java | 21 +++--
.../javax/swing/JTable/TestCaretArtifact.java | 86 +++++++++++++++++++
2 files changed, 99 insertions(+), 8 deletions(-)
create mode 100644 test/jdk/javax/swing/JTable/TestCaretArtifact.java
diff --git a/src/java.desktop/macosx/classes/com/apple/laf/AquaCaret.java b/src/java.desktop/macosx/classes/com/apple/laf/AquaCaret.java
index 9b0981aa8b2..3c1b147d1ea 100644
--- a/src/java.desktop/macosx/classes/com/apple/laf/AquaCaret.java
+++ b/src/java.desktop/macosx/classes/com/apple/laf/AquaCaret.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2011, 2024, 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
@@ -189,20 +189,25 @@ protected synchronized void damage(final Rectangle r) {
// intersection of the caret rectangle and the component less the border, if any.
final Rectangle caretRect = new Rectangle(x, y, width, height);
final Border border = getComponent().getBorder();
- if (border != null) {
- final Rectangle alloc = getComponent().getBounds();
- alloc.x = alloc.y = 0;
+ final Rectangle alloc = getComponent().getBounds();
+ alloc.x = alloc.y = 0;
+ if (border != null && border.isBorderOpaque()) {
final Insets borderInsets = border.getBorderInsets(getComponent());
alloc.x += borderInsets.left;
alloc.y += borderInsets.top;
alloc.width -= borderInsets.left + borderInsets.right;
alloc.height -= borderInsets.top + borderInsets.bottom;
Rectangle2D.intersect(caretRect, alloc, caretRect);
+ x = caretRect.x;
+ y = caretRect.y;
+ width = Math.max(caretRect.width, 1);
+ height = Math.max(caretRect.height, 1);
+ } else {
+ x = alloc.x;
+ y = alloc.y;
+ width = alloc.width;
+ height = alloc.height;
}
- x = caretRect.x;
- y = caretRect.y;
- width = Math.max(caretRect.width, 1);
- height = Math.max(caretRect.height, 1);
repaint();
}
diff --git a/test/jdk/javax/swing/JTable/TestCaretArtifact.java b/test/jdk/javax/swing/JTable/TestCaretArtifact.java
new file mode 100644
index 00000000000..98e174315a9
--- /dev/null
+++ b/test/jdk/javax/swing/JTable/TestCaretArtifact.java
@@ -0,0 +1,86 @@
+/*
+ * Copyright (c) 2024, 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.
+ */
+
+/*
+ * @test
+ * @bug 8268145
+ * @library /java/awt/regtesthelpers
+ * @build PassFailJFrame
+ * @requires (os.family == "mac")
+ * @summary Verify rendering artifact is not seen moving caret inside
+ * JTable with TableCellEditor having JTextField
+ * @run main/manual TestCaretArtifact
+ */
+
+import javax.swing.DefaultCellEditor;
+import javax.swing.JFrame;
+import javax.swing.JTable;
+import javax.swing.JTextField;
+import javax.swing.table.TableCellEditor;
+import javax.swing.table.TableColumn;
+import javax.swing.SwingUtilities;
+
+public class TestCaretArtifact {
+
+ private static final String INSTRUCTIONS = """
+ Double click on "Click Here" textfield so that textfield becomes editable;
+ Press spacebar. Press left arrow button.
+ Do this few times.
+ If artifact is seen, press Fail else press Pass.""";
+
+ public static void main(String[] args) throws Exception {
+ PassFailJFrame.builder()
+ .title("Caret Artifact Instructions")
+ .instructions(INSTRUCTIONS)
+ .columns(35)
+ .testUI(TestCaretArtifact::createUI)
+ .build()
+ .awaitAndCheck();
+ }
+
+
+ public static JFrame createUI() {
+ TableCellEditor editor = new TestEditor(new JTextField());
+ JTable table = new JTable(new Object[][] {{"click here",
+ "inactive forever"}},
+ new Object[] {"1", "2"});
+
+ JFrame frame = new JFrame("CaretArtifact");
+ TableColumn column = table.getColumn("1");
+ column.setCellEditor(editor);
+ frame.getContentPane().add("Center", table);
+ frame.setSize(400, 100);
+
+ return frame;
+ }
+
+ static class TestEditor extends DefaultCellEditor {
+ public TestEditor(JTextField tf) {
+ super(tf);
+ }
+ public boolean stopCellEditing() {
+ return false;
+ }
+ }
+}
+
From 2286fae300b37f4b69ed817d3edea6fe7fa2f52d Mon Sep 17 00:00:00 2001
From: Kim Barrett
Date: Fri, 6 Dec 2024 06:32:03 +0000
Subject: [PATCH 11/89] 8345159: RISCV: Fix -Wzero-as-null-pointer-constant
warning in emit_static_call_stub
Reviewed-by: mli, rehn
---
src/hotspot/cpu/riscv/macroAssembler_riscv.cpp | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/hotspot/cpu/riscv/macroAssembler_riscv.cpp b/src/hotspot/cpu/riscv/macroAssembler_riscv.cpp
index 44b806834f9..07c5a940a50 100644
--- a/src/hotspot/cpu/riscv/macroAssembler_riscv.cpp
+++ b/src/hotspot/cpu/riscv/macroAssembler_riscv.cpp
@@ -785,7 +785,7 @@ void MacroAssembler::emit_static_call_stub() {
// Jump to the entry point of the c2i stub.
int32_t offset = 0;
- movptr(t1, 0, offset, t0); // lui + lui + slli + add
+ movptr2(t1, 0, offset, t0); // lui + lui + slli + add
jr(t1, offset);
}
From d9a22139fb14c67e2b1dac2c93c1e46bc3b14c72 Mon Sep 17 00:00:00 2001
From: Roland Westrelin
Date: Fri, 6 Dec 2024 09:18:46 +0000
Subject: [PATCH 12/89] 8345299: C2: some nodes can still have incorrect
control after do_range_check()
Reviewed-by: chagedorn, kvn
---
src/hotspot/share/opto/loopTransform.cpp | 24 ++++++++++++++----------
src/hotspot/share/opto/loopnode.hpp | 2 +-
2 files changed, 15 insertions(+), 11 deletions(-)
diff --git a/src/hotspot/share/opto/loopTransform.cpp b/src/hotspot/share/opto/loopTransform.cpp
index f644e26bbe7..6efad724917 100644
--- a/src/hotspot/share/opto/loopTransform.cpp
+++ b/src/hotspot/share/opto/loopTransform.cpp
@@ -2463,7 +2463,7 @@ bool PhaseIdealLoop::is_scaled_iv_plus_extra_offset(Node* exp1, Node* offset3, N
//------------------------------do_range_check---------------------------------
// Eliminate range-checks and other trip-counter vs loop-invariant tests.
-void PhaseIdealLoop::do_range_check(IdealLoopTree *loop, Node_List &old_new) {
+void PhaseIdealLoop::do_range_check(IdealLoopTree* loop) {
#ifndef PRODUCT
if (PrintOpto && VerifyLoopOptimizations) {
tty->print("Range Check Elimination ");
@@ -2526,8 +2526,9 @@ void PhaseIdealLoop::do_range_check(IdealLoopTree *loop, Node_List &old_new) {
// Range check elimination optimizes out conditions whose parameters are loop invariant in the main loop. They usually
// have control above the pre loop, but there's no guarantee that they do. There's no guarantee either that the pre
// loop limit has control that's out of loop (a previous round of range check elimination could have set a limit that's
- // not loop invariant).
- Node* new_limit_ctrl = dominated_node(pre_ctrl, pre_limit_ctrl);
+ // not loop invariant). new_limit_ctrl is used for both the pre and main loops. Early control for the main limit may be
+ // below the pre loop entry and the pre limit and must be taken into account when initializing new_limit_ctrl.
+ Node* new_limit_ctrl = dominated_node(pre_ctrl, pre_limit_ctrl, compute_early_ctrl(main_limit, main_limit_ctrl));
// Ensure the original loop limit is available from the
// pre-loop Opaque1 node.
@@ -2778,8 +2779,10 @@ void PhaseIdealLoop::do_range_check(IdealLoopTree *loop, Node_List &old_new) {
// new pre_limit can push Bool/Cmp/Opaque nodes down (when one of the eliminated condition has parameters that are not
// loop invariant in the pre loop.
set_ctrl(pre_opaq, new_limit_ctrl);
- set_ctrl(pre_end->cmp_node(), new_limit_ctrl);
- set_ctrl(pre_end->in(1), new_limit_ctrl);
+ // Can't use new_limit_ctrl for Bool/Cmp because it can be out of loop while they are loop variant. Conservatively set
+ // control to latest possible one.
+ set_ctrl(pre_end->cmp_node(), pre_end->in(0));
+ set_ctrl(pre_end->in(1), pre_end->in(0));
_igvn.replace_input_of(pre_opaq, 1, pre_limit);
@@ -2819,11 +2822,12 @@ void PhaseIdealLoop::do_range_check(IdealLoopTree *loop, Node_List &old_new) {
// The OpaqueNode is unshared by design
assert(opqzm->outcnt() == 1, "cannot hack shared node");
_igvn.replace_input_of(opqzm, 1, main_limit);
- // new main_limit can push Bool/Cmp nodes down (when one of the eliminated condition has parameters that are not loop
- // invariant in the pre loop.
+ // new main_limit can push opaque node for zero trip guard down (when one of the eliminated condition has parameters
+ // that are not loop invariant in the pre loop).
set_ctrl(opqzm, new_limit_ctrl);
- set_ctrl(iffm->in(1)->in(1), new_limit_ctrl);
- set_ctrl(iffm->in(1), new_limit_ctrl);
+ // Bool/Cmp nodes for zero trip guard should have been assigned control between the main and pre loop (because zero
+ // trip guard depends on induction variable value out of pre loop) so shouldn't need to be adjusted
+ assert(is_dominator(new_limit_ctrl, get_ctrl(iffm->in(1)->in(1))), "control of cmp should be below control of updated input");
C->print_method(PHASE_AFTER_RANGE_CHECK_ELIMINATION, 4, cl);
}
@@ -3402,7 +3406,7 @@ bool IdealLoopTree::iteration_split_impl(PhaseIdealLoop *phase, Node_List &old_n
// with full checks, but the main-loop with no checks. Remove said checks
// from the main body.
if (should_rce) {
- phase->do_range_check(this, old_new);
+ phase->do_range_check(this);
}
// Double loop body for unrolling. Adjust the minimum-trip test (will do
diff --git a/src/hotspot/share/opto/loopnode.hpp b/src/hotspot/share/opto/loopnode.hpp
index 698e48aadb4..07a5e28b23e 100644
--- a/src/hotspot/share/opto/loopnode.hpp
+++ b/src/hotspot/share/opto/loopnode.hpp
@@ -1416,7 +1416,7 @@ class PhaseIdealLoop : public PhaseTransform {
}
// Eliminate range-checks and other trip-counter vs loop-invariant tests.
- void do_range_check(IdealLoopTree *loop, Node_List &old_new);
+ void do_range_check(IdealLoopTree* loop);
// Clone loop with an invariant test (that does not exit) and
// insert a clone of the test that selects which version to
From 874d68a96ce67caaf944dd25fbfb44eab965dfd3 Mon Sep 17 00:00:00 2001
From: Roland Westrelin
Date: Fri, 6 Dec 2024 09:19:55 +0000
Subject: [PATCH 13/89] 8343747: C2: TestReplicateAtConv.java crashes with
-XX:MaxVectorSize=8
Reviewed-by: epeter, kvn
---
src/hotspot/share/opto/vectornode.cpp | 3 +++
.../jtreg/compiler/vectorization/TestReplicateAtConv.java | 5 +++--
2 files changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/hotspot/share/opto/vectornode.cpp b/src/hotspot/share/opto/vectornode.cpp
index dedac80d102..03e1e7ef247 100644
--- a/src/hotspot/share/opto/vectornode.cpp
+++ b/src/hotspot/share/opto/vectornode.cpp
@@ -1466,6 +1466,9 @@ bool VectorCastNode::implemented(int opc, uint vlen, BasicType src_type, BasicTy
if (is_java_primitive(dst_type) &&
is_java_primitive(src_type) &&
(vlen > 1) && is_power_of_2(vlen) &&
+ // In rare case, the input to the VectorCast could be a Replicate node. We need to make sure creating is supported:
+ // check the src_type:
+ VectorNode::vector_size_supported_auto_vectorization(src_type, vlen) &&
VectorNode::vector_size_supported_auto_vectorization(dst_type, vlen)) {
int vopc = VectorCastNode::opcode(opc, src_type);
return vopc > 0 && Matcher::match_rule_supported_auto_vectorization(vopc, vlen, dst_type);
diff --git a/test/hotspot/jtreg/compiler/vectorization/TestReplicateAtConv.java b/test/hotspot/jtreg/compiler/vectorization/TestReplicateAtConv.java
index e77b474bf66..74ae97cc7ee 100644
--- a/test/hotspot/jtreg/compiler/vectorization/TestReplicateAtConv.java
+++ b/test/hotspot/jtreg/compiler/vectorization/TestReplicateAtConv.java
@@ -23,9 +23,10 @@
/**
* @test
- * @bug 8341834
- * @summary C2 compilation fails with "bad AD file" due to Replicate
+ * @bug 8341834 8343747
+ * @summary Replicate node at a VectorCast (ConvL2I) causes superword to fail
* @run main/othervm -XX:CompileCommand=compileonly,TestReplicateAtConv::test -Xcomp TestReplicateAtConv
+ * @run main/othervm -XX:CompileCommand=compileonly,TestReplicateAtConv::test -Xcomp -XX:MaxVectorSize=8 TestReplicateAtConv
*/
public class TestReplicateAtConv {
From f6021a9c34da877bf954f5b90b4233949ec0ffc7 Mon Sep 17 00:00:00 2001
From: Daniel Gredler
Date: Fri, 6 Dec 2024 13:07:35 +0000
Subject: [PATCH 14/89] 8344668: Unnecessary array allocations and copying in
TextLine
Reviewed-by: honkar, azvegint, prr
---
src/java.desktop/share/classes/java/awt/font/TextLine.java | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/src/java.desktop/share/classes/java/awt/font/TextLine.java b/src/java.desktop/share/classes/java/awt/font/TextLine.java
index 1e4b9c784a6..681fcd90083 100644
--- a/src/java.desktop/share/classes/java/awt/font/TextLine.java
+++ b/src/java.desktop/share/classes/java/awt/font/TextLine.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1998, 2018, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 2024, 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
@@ -1021,7 +1021,7 @@ public static TextLineComponent[] createComponentsOnRun(int runStart,
factory.createExtended(font, cm, decorator, startPos, startPos + lmCount);
++numComponents;
- if (numComponents >= components.length) {
+ if (numComponents > components.length) {
components = expandArray(components);
}
@@ -1076,7 +1076,7 @@ public static TextLineComponent[] getComponents(StyledParagraph styledParagraph,
pos = chunkLimit;
++numComponents;
- if (numComponents >= tempComponents.length) {
+ if (numComponents > tempComponents.length) {
tempComponents = expandArray(tempComponents);
}
From 0e2a28527738d227a66ea44b9a5c037c72039044 Mon Sep 17 00:00:00 2001
From: Evgeny Nikitin
Date: Fri, 6 Dec 2024 14:19:15 +0000
Subject: [PATCH 15/89] 8344833: CTW: Make failing on zero classes optional
Reviewed-by: thartmann, kvn
---
.../ctw/src/sun/hotspot/tools/ctw/CtwRunner.java | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/test/hotspot/jtreg/testlibrary/ctw/src/sun/hotspot/tools/ctw/CtwRunner.java b/test/hotspot/jtreg/testlibrary/ctw/src/sun/hotspot/tools/ctw/CtwRunner.java
index e2c7230bc0d..72d481ac616 100644
--- a/test/hotspot/jtreg/testlibrary/ctw/src/sun/hotspot/tools/ctw/CtwRunner.java
+++ b/test/hotspot/jtreg/testlibrary/ctw/src/sun/hotspot/tools/ctw/CtwRunner.java
@@ -172,8 +172,14 @@ private void startCtwforAllClasses() {
long classStart = start(totalClassCount);
long classStop = stop(totalClassCount);
-
long classCount = classStop - classStart;
+
+ boolean allowZeroClassCount = Boolean.getBoolean("sun.hotspot.tools.ctw.allow_zero_class_count");
+ if (allowZeroClassCount && totalClassCount == 0L) {
+ System.out.println("WARN: " + target + "(at " + targetPath + ") has no classes. Ignoring.");
+ return;
+ }
+
Asserts.assertGreaterThan(classCount, 0L,
target + "(at " + targetPath + ") does not have any classes");
From 496641955041c5e48359e6256a4a61812653d900 Mon Sep 17 00:00:00 2001
From: Chen Liang
Date: Fri, 6 Dec 2024 14:25:03 +0000
Subject: [PATCH 16/89] 8334733: Remove obsolete @enablePreview from tests
after JDK-8334714
Reviewed-by: mchung, asotona
---
.../runtime/test/TestResolvedJavaMethod.java | 1 -
.../dcmd/framework/VMVersionTest.java | 1 -
test/hotspot/jtreg/testlibrary/ctw/Makefile | 4 ++--
.../records/BadCanonicalCtrTest.java | 1 -
.../records/ProhibitedMethods.java | 1 -
.../records/SerialPersistentFieldsTest.java | 1 -
.../getSimpleName/GetSimpleNameTest.java | 1 -
.../lang/ModuleTests/AnnotationsTest.java | 1 -
test/jdk/java/lang/StackWalker/TestBCI.java | 1 -
.../AnnotationTypeMismatchTest.java | 1 -
.../ArityTypeMismatchTest.java | 1 -
.../ArrayTypeMismatchTest.java | 1 -
.../EnumTypeMismatchTest.java | 1 -
.../lang/annotation/AnnotationVerifier.java | 1 -
.../instrument/NativeMethodPrefixApp.java | 3 ---
.../java/lang/instrument/RetransformApp.java | 3 ---
.../lang/invoke/8022701/MHIllegalAccess.java | 1 -
.../jdk/java/lang/invoke/DefineClassTest.java | 1 -
.../invoke/MethodHandleProxies/BasicTest.java | 1 -
.../WrapperHiddenClassTest.java | 1 -
.../classData/ClassDataTest.java | 1 -
.../invoke/accessProtectedSuper/Test.java | 1 -
.../condy/BootstrapMethodJumboArgsTest.java | 1 -
.../lang/invoke/condy/CondyBSMException.java | 1 -
.../lang/invoke/condy/CondyBSMInvocation.java | 1 -
.../invoke/condy/CondyBSMValidationTest.java | 1 -
.../CondyInterfaceWithOverpassMethods.java | 1 -
.../invoke/condy/CondyNameValidationTest.java | 1 -
.../lang/invoke/condy/CondyNestedTest.java | 1 -
.../condy/CondyRepeatFailedResolution.java | 1 -
.../condy/CondyReturnPrimitiveTest.java | 1 -
.../condy/CondyStaticArgumentsTest.java | 1 -
.../invoke/condy/CondyTypeValidationTest.java | 1 -
.../invoke/condy/CondyWithGarbageTest.java | 1 -
.../lang/invoke/condy/CondyWrongType.java | 1 -
.../invoke/condy/ConstantBootstrapsTest.java | 1 -
.../invoke/defineHiddenClass/BasicTest.java | 5 +----
.../defineHiddenClass/HiddenNestmateTest.java | 1 -
.../StaticInvocableTest.java | 1 -
.../java/lang/invoke/lambda/LambdaAsm.java | 1 -
.../lang/invoke/lambda/LambdaStackTrace.java | 1 -
.../lang/invoke/lookup/SpecialStatic.java | 1 -
.../lang/module/ClassFileVersionsTest.java | 1 -
.../java/lang/module/ConfigurationTest.java | 1 -
.../lang/module/ModuleDescriptorTest.java | 1 -
.../java/lang/module/ModuleFinderTest.java | 1 -
.../jdk/java/lang/module/ModuleNamesTest.java | 1 -
.../java/lang/module/MultiReleaseJarTest.java | 1 -
.../Generics/TestMissingTypeVariable.java | 1 -
.../TestPrivateInterfaceMethodReflect.java | 1 -
.../lang/reflect/records/IsRecordTest.java | 1 -
.../ExactnessConversionsSupportTest.java | 2 --
.../lang/runtime/SwitchBootstrapsTest.java | 1 -
.../Provider/SecurityProviderModularTest.java | 1 -
.../java/time/chrono/HijrahConfigTest.java | 1 -
.../util/ServiceLoader/BadProvidersTest.java | 1 -
.../login/modules/JaasModularClientTest.java | 1 -
.../jdk/classfile/ClassHierarchyInfoTest.java | 1 -
test/jdk/jdk/classfile/SnippetsTest.java | 3 +--
test/jdk/jdk/classfile/TEST.properties | 1 -
test/jdk/jdk/classfile/VerifierSelfTest.java | 1 -
.../CallerSensitiveFinder.java | 1 -
.../reflect/CallerSensitive/CheckCSMs.java | 1 -
.../MissingCallerSensitive.java | 1 -
.../event/compiler/TestCompilerInlining.java | 1 -
.../jdk/jfr/event/io/TestInstrumentation.java | 3 ---
.../javaagent/TestEventInstrumentation.java | 1 -
test/jdk/jdk/lambda/TEST.properties | 1 -
.../jdk/modules/incubator/ServiceBinding.java | 1 -
.../jdk/sun/tools/jcmd/TestProcessHelper.java | 1 -
.../tools/jimage/JImageNonAsciiNameTest.java | 1 -
test/jdk/tools/jimage/JImageTest.java | 1 -
test/jdk/tools/jlink/DefaultProviderTest.java | 1 -
.../tools/jlink/ExplodedModuleNameTest.java | 1 -
test/jdk/tools/jlink/IntegrationTest.java | 1 -
test/jdk/tools/jlink/JLink100Modules.java | 1 -
test/jdk/tools/jlink/JLink2Test.java | 1 -
.../jlink/JLinkDedupTestBatchSizeOne.java | 1 -
test/jdk/tools/jlink/JLinkNegativeTest.java | 1 -
test/jdk/tools/jlink/JLinkOptionsTest.java | 1 -
test/jdk/tools/jlink/JLinkPluginsTest.java | 1 -
test/jdk/tools/jlink/JLinkTest.java | 1 -
.../jdk/tools/jlink/ModuleNamesOrderTest.java | 1 -
test/jdk/tools/jlink/NativeTest.java | 1 -
.../jlink/plugins/AddOptionsPluginTest.java | 1 -
.../tools/jlink/plugins/CDSPluginTest.java | 1 -
.../plugins/GenerateJLIClassesPluginTest.java | 1 -
.../plugins/IncludeLocalesPluginTest.java | 1 -
.../plugins/SaveJlinkArgfilesPluginTest.java | 1 -
.../plugins/StringSharingPluginTest.java | 1 -
.../StripJavaDebugAttributesPluginTest.java | 1 -
.../jlink/plugins/VendorInfoPluginsTest.java | 1 -
.../jdk/javadoc/tool/CheckResourceKeys.java | 1 -
.../tools/javac/4241573/T4241573.java | 2 --
.../tools/javac/7003595/T7003595.java | 4 +---
.../CPoolRefClassContainingInlinedCts.java | 2 --
.../CheckACC_STRICTFlagOnclinitTest.java | 1 -
.../8000518/DuplicateConstantPoolEntry.java | 2 --
...eckACC_STRICTFlagOnPkgAccessClassTest.java | 2 --
.../8009170/RedundantByteCodeInArrayTest.java | 1 -
.../AnonymousClass/AnonymousClassFlags.java | 2 --
.../MethodParameters/AnnotationTest.java | 2 --
.../MethodParameters/AnonymousClass.java | 2 --
.../MethodParameters/ClassFileVisitor.java | 2 +-
.../javac/MethodParameters/Constructors.java | 2 --
.../javac/MethodParameters/EnumTest.java | 2 --
.../MethodParameters/InstanceMethods.java | 2 --
.../javac/MethodParameters/LambdaTest.java | 2 --
.../LegacyOutputTest/LegacyOutputTest.java | 2 --
.../MethodParameters/LocalClassTest.java | 2 --
.../MethodParameters/MemberClassTest.java | 2 --
.../javac/MethodParameters/StaticMethods.java | 2 --
.../MethodParameters/UncommonParamNames.java | 2 --
.../tools/javac/MethodParametersTest.java | 4 +---
.../tools/javac/NoStringToLower.java | 3 +--
.../ImplicitParameters.java | 2 --
.../StringConcat/TestIndyStringConcat.java | 1 -
.../StringConcat/WellKnownTypeSignatures.java | 2 --
.../javac/StringConcat/WellKnownTypes.java | 1 -
.../tools/javac/StringConcat/access/Test.java | 1 -
...ationsAreNotCopiedToBridgeMethodsTest.java | 4 +---
.../DebugPointerAtBadPositionTest.java | 4 +---
.../InlinedFinallyConfuseDebuggersTest.java | 4 +---
.../tools/javac/T7053059/DoubleCastTest.java | 4 +---
test/langtools/tools/javac/T7093325.java | 4 +---
...rClassAttrMustNotHaveStrictFPFlagTest.java | 1 -
.../T8003967/DetectMutableStaticFields.java | 14 ++++++--------
...rNamesAreNotCopiedToAnonymousInitTest.java | 7 +------
.../EmptyUTF8ForInnerClassNameTest.java | 1 -
.../javac/T8019486/WrongLNTForLambdaTest.java | 2 --
.../DeadCodeGeneratedForEmptyTryTest.java | 4 +---
.../NoDeadCodeGenerationOnTrySmtTest.java | 2 --
.../DontGenerateLVTForGNoneOpTest.java | 1 -
.../MissingLNTEntryForBreakContinueTest.java | 4 +---
.../MissingLNTEntryForFinalizerTest.java | 4 +---
.../T8187805/BogusRTTAForUnusedVarTest.java | 4 +---
...TargetIsNotAddedAsMarkerInterfaceTest.java | 4 +---
.../T8209173/CodeCompletionExceptTest.java | 4 +---
...oLocalsMustBeReservedForDCEedVarsTest.java | 1 -
.../javac/T8222949/TestConstantDynamic.java | 4 +---
.../TryWithResources/TwrSimpleClose.java | 2 --
.../ApplicableAnnotationsOnRecords.java | 2 --
.../annotations/SyntheticParameters.java | 2 --
.../parameter/ParameterAnnotations.java | 5 ++---
.../TypeAnnotationsPositionsOnRecords.java | 2 --
.../VariablesDeclaredWithVarTest.java | 2 --
.../classfile/AnonymousClassTest.java | 2 --
.../classfile/CombinationsTargetTest1.java | 2 --
.../classfile/CombinationsTargetTest2.java | 2 --
.../classfile/CombinationsTargetTest3.java | 2 --
.../typeAnnotations/classfile/DeadCode.java | 2 --
.../classfile/InstanceInitializer.java | 2 --
.../classfile/NewTypeArguments.java | 2 --
.../classfile/NoTargetAnnotations.java | 2 --
.../typeAnnotations/classfile/Scopes.java | 2 --
.../classfile/StaticInitializer.java | 2 --
.../classfile/SyntheticParameters.java | 2 --
.../typeAnnotations/classfile/T8008762.java | 2 --
.../typeAnnotations/classfile/T8008769.java | 2 --
.../typeAnnotations/classfile/T8010015.java | 2 --
.../classfile/TestAnonInnerClasses.java | 3 ---
.../classfile/TestNewCastArray.java | 2 --
.../TypeAnnotationPropagationTest.java | 2 --
.../typeAnnotations/classfile/TypeCasts.java | 1 -
.../typeAnnotations/classfile/Wildcards.java | 1 -
.../referenceinfos/ClassExtends.java | 2 --
.../referenceinfos/ClassTypeParam.java | 2 --
.../ConstructorInvocationTypeArgument.java | 2 --
.../referenceinfos/Constructors.java | 2 --
.../referenceinfos/ExceptionParameters.java | 2 --
.../referenceinfos/Fields.java | 2 --
.../referenceinfos/FromSpecification.java | 2 --
.../referenceinfos/Initializers.java | 2 --
.../referenceinfos/Lambda.java | 2 --
.../MethodInvocationTypeArgument.java | 2 --
.../referenceinfos/MethodParameters.java | 2 --
.../referenceinfos/MethodReceivers.java | 2 --
.../referenceinfos/MethodReturns.java | 2 --
.../referenceinfos/MethodThrows.java | 2 --
.../referenceinfos/MethodTypeParam.java | 2 --
.../referenceinfos/MultiCatch.java | 2 --
.../referenceinfos/NestedTypes.java | 2 --
.../referenceinfos/NewObjects.java | 2 --
.../RepeatingTypeAnnotations.java | 2 --
.../referenceinfos/ResourceVariable.java | 2 --
.../referenceinfos/TypeCasts.java | 2 --
.../referenceinfos/TypeTests.java | 2 --
.../intersection/DuplicatedCheckcastTest.java | 4 +---
.../InnerClasses/SyntheticClasses.java | 2 --
.../javac/classfiles/T8255757/T8255757.java | 2 --
.../AnnotationDefaultTest.java | 1 -
.../EnclosingMethod/EnclosingMethodTest.java | 1 -
.../LineNumberTable/LineNumberTest.java | 1 -
.../MultipleRecordPatterns.java | 1 -
.../LineNumberTable/RuleSwitchBreaks.java | 1 -
.../LineNumberTable/StringSwitchBreaks.java | 1 -
.../attributes/LineNumberTable/T8050993.java | 2 --
.../attributes/LineNumberTable/T8314275.java | 1 -
.../LocalVariableTableTest.java | 1 -
.../LocalVariableTypeTableTest.java | 1 -
.../attributes/Module/ModuleFlagTest.java | 2 --
.../attributes/Module/ModuleTest.java | 2 --
.../attributes/Signature/ConstructorTest.java | 1 -
.../attributes/Signature/EnumTest.java | 1 -
.../attributes/Signature/ExceptionTest.java | 1 -
.../attributes/Signature/FieldTest.java | 1 -
.../attributes/Signature/InnerClassTest.java | 1 -
.../Signature/MethodParameterTest.java | 1 -
.../Signature/MethodTypeBoundTest.java | 1 -
.../attributes/Signature/ReturnTypeTest.java | 1 -
.../SourceFile/AnonymousClassTest.java | 1 -
.../attributes/SourceFile/InnerClassTest.java | 1 -
.../attributes/SourceFile/LocalClassTest.java | 1 -
.../attributes/SourceFile/MixTest.java | 1 -
.../attributes/SourceFile/ModuleInfoTest.java | 1 -
.../SourceFile/NoSourceFileAttribute.java | 1 -
.../SourceFile/SyntheticClassTest.java | 1 -
.../TopLevelClassesOneFileTest.java | 1 -
...ssToPrivateInnerClassConstructorsTest.java | 2 --
.../AccessToPrivateInnerClassMembersTest.java | 2 --
.../AccessToPrivateSiblingsTest.java | 2 --
.../attributes/Synthetic/AssertFieldTest.java | 2 --
.../BridgeMethodForGenericMethodTest.java | 2 --
...geMethodsForLambdaTargetRelease14Test.java | 5 ++---
.../Synthetic/BridgeMethodsForLambdaTest.java | 2 --
.../attributes/Synthetic/EnumTest.java | 2 --
.../attributes/Synthetic/PackageInfoTest.java | 2 --
.../attributes/Synthetic/ThisFieldTest.java | 2 --
...untimeAnnotationsForGenericMethodTest.java | 4 +---
...timeAnnotationsForInnerAnnotationTest.java | 4 +---
.../RuntimeAnnotationsForInnerClassTest.java | 4 +---
.../RuntimeAnnotationsForInnerEnumTest.java | 4 +---
...ntimeAnnotationsForInnerInterfaceTest.java | 4 +---
...untimeAnnotationsForTopLevelClassTest.java | 4 +---
...ameterAnnotationsForGenericMethodTest.java | 4 +---
...timeParameterAnnotationsForLambdaTest.java | 4 +---
.../RuntimeParameterAnnotationsTest.java | 4 +---
.../deprecated/DeprecatedPackageTest.java | 2 --
.../attributes/deprecated/DeprecatedTest.java | 1 -
...InnerAnnotationsInInnerAnnotationTest.java | 1 -
.../InnerAnnotationsInInnerClassTest.java | 1 -
.../InnerAnnotationsInInnerEnumTest.java | 1 -
.../InnerAnnotationsInInnerInterfaceTest.java | 1 -
.../InnerClassesHierarchyTest.java | 2 --
.../InnerClassesInAnonymousClassTest.java | 1 -
.../InnerClassesInInnerAnnotationTest.java | 1 -
.../InnerClassesInInnerClassTest.java | 1 -
.../InnerClassesInInnerEnumTest.java | 1 -
.../InnerClassesInInnerInterfaceTest.java | 1 -
.../InnerClassesInLocalClassTest.java | 1 -
.../innerclasses/InnerClassesIndexTest.java | 2 --
.../innerclasses/InnerClassesTest.java | 1 -
.../InnerEnumInInnerAnnotationTest.java | 1 -
.../InnerEnumInInnerEnumTest.java | 1 -
.../InnerEnumInInnerInterfaceTest.java | 1 -
.../InnerEnumsInInnerClassTest.java | 1 -
.../InnerInterfacesInInnerAnnotationTest.java | 1 -
.../InnerInterfacesInInnerClassTest.java | 1 -
.../InnerInterfacesInInnerEnumTest.java | 1 -
.../InnerInterfacesInInnerInterfaceTest.java | 1 -
.../innerclasses/NoInnerClassesTest.java | 2 --
.../classreader/8171132/BadConstantValue.java | 4 +---
.../javac/classreader/BadMethodParameter.java | 5 +----
.../IndyCorrectInvocationName.java | 2 --
.../tools/javac/code/CharImmediateValue.java | 2 --
.../javac/constDebug/ConstDebugTest.java | 1 -
.../javac/defaultMethods/BadClassfile.java | 4 +---
...heckACC_STRICTFlagOnDefaultMethodTest.java | 1 -
.../javac/defaultMethods/TestDefaultBody.java | 2 --
.../TestNoBridgeOnDefaults.java | 2 --
.../super/TestDirectSuperInterfaceInvoke.java | 2 --
.../tools/javac/diags/CheckResourceKeys.java | 2 --
test/langtools/tools/javac/diags/Example.java | 11 -----------
.../BadConstantValueType.java | 1 -
.../InvalidDefaultInterface.java | 1 -
.../InvalidStaticInterface.java | 1 -
.../_super/NonDirectSuper/NonDirectSuper.java | 2 --
.../tools/javac/file/SymLinkArchiveTest.java | 2 --
.../javac/file/SymLinkShortNameTest.java | 2 --
.../tools/javac/file/SymLinkTest.java | 2 --
.../tools/javac/flow/LVTHarness.java | 2 --
.../javac/generics/bridges/BridgeHarness.java | 4 +---
.../tools/javac/importscope/T8193717.java | 4 +---
.../jvm/ClassRefDupInConstantPoolTest.java | 1 -
.../tools/javac/lambda/ByteCodeTest.java | 2 --
.../javac/lambda/LambdaTestStrictFPFlag.java | 1 -
.../javac/lambda/LocalVariableTable.java | 2 --
.../lambda/TestBootstrapMethodsCount.java | 4 +---
.../tools/javac/lambda/TestInvokeDynamic.java | 4 +---
.../lambda/bytecode/TestLambdaBytecode.java | 4 +---
.../TestLambdaBytecodeTargetRelease14.java | 4 +---
.../deduplication/DeduplicationTest.java | 5 +----
...estNonSerializableLambdaNameStability.java | 4 +---
.../tools/javac/launcher/GetResourceTest.java | 2 --
.../javac/launcher/SourceLauncherTest.java | 8 +++-----
.../tools/javac/launcher/src/p/q/CLTest.java | 4 +---
.../ConditionalLineNumberTest.java | 1 -
.../linenumbers/FinallyLineNumberTest.java | 1 -
.../linenumbers/NestedLineNumberTest.java | 5 ++---
.../linenumbers/NullCheckLineNumberTest.java | 19 +++++++++----------
test/langtools/tools/javac/meth/TestCP.java | 2 --
.../javac/modules/AnnotationsOnModules.java | 2 --
.../tools/javac/modules/IncubatingTest.java | 2 --
.../tools/javac/modules/JavaBaseTest.java | 2 --
.../tools/javac/modules/ModuleVersion.java | 2 --
.../tools/javac/modules/OpenModulesTest.java | 2 --
.../javac/multicatch/7005371/T7005371.java | 2 --
.../tools/javac/multicatch/Pos05.java | 2 --
.../tools/javac/patterns/Annotations.java | 4 +---
.../javac/patterns/LocalVariableTable.java | 2 --
.../javac/patterns/MatchExceptionTest.java | 2 --
.../NestedPatternVariablesBytecode.java | 2 --
.../javac/patterns/NoUnnecessaryCast.java | 2 --
.../javac/platform/ModuleVersionTest.java | 1 -
.../javac/platform/VerifyCTSymClassFiles.java | 1 -
.../createsymbols/CreateSymbolsTest.java | 4 ----
.../javac/preview/PreviewAutoSuppress.java | 2 --
.../tools/javac/preview/PreviewErrors.java | 2 --
.../tools/javac/preview/PreviewTest.java | 2 --
.../model/element/TestFileObjectOf.java | 2 --
.../processing/model/element/TestOrigin.java | 2 --
.../javac/records/RecordCompilationTests.java | 2 --
.../RecordsBinaryCompatibilityTests.java | 2 --
.../RecordComponentTypeTest.java | 2 --
.../javac/recovery/AnnotationRecovery.java | 2 --
.../tools/javac/recovery/AttrRecovery.java | 2 --
.../tools/javac/recovery/FlowRecovery.java | 2 --
.../tools/javac/recovery/LambdaRecovery.java | 2 --
.../tools/javac/recovery/MethodModifiers.java | 2 --
.../tools/javac/resolve/NoObjectToString.java | 1 -
.../sealed/BinaryCompatibilityTests.java | 2 --
.../sealed/CheckSubtypesOfSealedTest.java | 4 +---
.../sealed/SealedDiffConfigurationsTest.java | 2 --
.../tools/javac/sym/ElementStructureTest.java | 4 +---
.../tools/javac/varargs/6199075/T6199075.java | 4 +---
.../tools/javac/varargs/7042566/T7042566.java | 4 +---
test/langtools/tools/javap/T6716452.java | 1 -
.../tools/javap/TestClassNameWarning.java | 1 -
.../tools/javap/UndefinedAccessFlagTest.java | 1 -
.../tools/javap/VerificationTest.java | 1 -
.../javap/classfile/6888367/T6888367.java | 2 --
.../tools/javap/classfile/T6887895.java | 1 -
.../tools/javap/classfile/deps/T6907575.java | 1 -
.../typeAnnotations/JSR175Annotations.java | 1 -
.../tools/javap/typeAnnotations/NewArray.java | 1 -
.../tools/javap/typeAnnotations/Presence.java | 1 -
.../javap/typeAnnotations/PresenceInner.java | 1 -
.../javap/typeAnnotations/TypeCasts.java | 1 -
.../javap/typeAnnotations/Visibility.java | 1 -
.../javap/typeAnnotations/Wildcards.java | 1 -
.../java/lang/classfile/TypeKindBench.java | 2 +-
.../java/lang/classfile/Utf8EntryWriteTo.java | 2 +-
.../java/lang/invoke/LazyStaticColdStart.java | 4 +---
.../classfile/AbstractCorpusBenchmark.java | 1 -
.../jdk/classfile/ClassfileBenchmark.java | 4 +---
.../jdk/classfile/CodeAttributeTools.java | 1 -
.../ConstantPoolBuildingClassEntry.java | 2 +-
.../jdk/classfile/RebuildMethodBodies.java | 3 +--
.../jdk/classfile/RepeatedModelTraversal.java | 3 +--
.../openjdk/bench/jdk/classfile/Write.java | 1 -
360 files changed, 79 insertions(+), 632 deletions(-)
diff --git a/test/hotspot/jtreg/compiler/jvmci/jdk.vm.ci.runtime.test/src/jdk/vm/ci/runtime/test/TestResolvedJavaMethod.java b/test/hotspot/jtreg/compiler/jvmci/jdk.vm.ci.runtime.test/src/jdk/vm/ci/runtime/test/TestResolvedJavaMethod.java
index 98d7d168ba7..75f074ad09d 100644
--- a/test/hotspot/jtreg/compiler/jvmci/jdk.vm.ci.runtime.test/src/jdk/vm/ci/runtime/test/TestResolvedJavaMethod.java
+++ b/test/hotspot/jtreg/compiler/jvmci/jdk.vm.ci.runtime.test/src/jdk/vm/ci/runtime/test/TestResolvedJavaMethod.java
@@ -32,7 +32,6 @@
* @clean jdk.internal.vm.test.AnnotationTestInput$Missing
* @compile ../../../../../../../../../../../jdk/jdk/internal/vm/AnnotationEncodingDecoding/alt/MemberDeleted.java
* ../../../../../../../../../../../jdk/jdk/internal/vm/AnnotationEncodingDecoding/alt/MemberTypeChanged.java
- * @enablePreview
* @modules jdk.internal.vm.ci/jdk.vm.ci.meta
* jdk.internal.vm.ci/jdk.vm.ci.runtime
* jdk.internal.vm.ci/jdk.vm.ci.common
diff --git a/test/hotspot/jtreg/serviceability/dcmd/framework/VMVersionTest.java b/test/hotspot/jtreg/serviceability/dcmd/framework/VMVersionTest.java
index 23c414dfd6e..3e2de863eab 100644
--- a/test/hotspot/jtreg/serviceability/dcmd/framework/VMVersionTest.java
+++ b/test/hotspot/jtreg/serviceability/dcmd/framework/VMVersionTest.java
@@ -34,7 +34,6 @@
* @test
* @bug 8221730
* @summary Test of diagnostic command VM.version (tests all DCMD executors)
- * @enablePreview
* @modules java.base/jdk.internal.misc
* java.base/jdk.internal.module
* java.compiler
diff --git a/test/hotspot/jtreg/testlibrary/ctw/Makefile b/test/hotspot/jtreg/testlibrary/ctw/Makefile
index b67500d0c5e..4cf20b12e52 100644
--- a/test/hotspot/jtreg/testlibrary/ctw/Makefile
+++ b/test/hotspot/jtreg/testlibrary/ctw/Makefile
@@ -42,8 +42,8 @@ JAVAC = $(JDK_HOME)/bin/javac
JAR = $(JDK_HOME)/bin/jar
SRC_FILES = $(shell find $(SRC_DIR) -name '*.java')
-# Exclude files that need '--enable-preview' to compile.
-LIB_FILES = $(filter-out %ModuleInfoWriter.java, $(shell find $(TESTLIBRARY_DIR)/jdk/test/lib/ \
+# Must exclude files that need '--enable-preview' to compile, if there is any.
+LIB_FILES = $(shell find $(TESTLIBRARY_DIR)/jdk/test/lib/ \
$(TESTLIBRARY_DIR)/jdk/test/lib/process \
$(TESTLIBRARY_DIR)/jdk/test/lib/util \
$(TESTLIBRARY_DIR)/jtreg \
diff --git a/test/jdk/java/io/Serializable/records/BadCanonicalCtrTest.java b/test/jdk/java/io/Serializable/records/BadCanonicalCtrTest.java
index c9b757a7b51..44959eaea87 100644
--- a/test/jdk/java/io/Serializable/records/BadCanonicalCtrTest.java
+++ b/test/jdk/java/io/Serializable/records/BadCanonicalCtrTest.java
@@ -27,7 +27,6 @@
* @summary InvalidClassException is thrown when the canonical constructor
* cannot be found during deserialization.
* @library /test/lib
- * @enablePreview
* @run testng BadCanonicalCtrTest
*/
diff --git a/test/jdk/java/io/Serializable/records/ProhibitedMethods.java b/test/jdk/java/io/Serializable/records/ProhibitedMethods.java
index 3a66e46f83b..d744e9ddbad 100644
--- a/test/jdk/java/io/Serializable/records/ProhibitedMethods.java
+++ b/test/jdk/java/io/Serializable/records/ProhibitedMethods.java
@@ -26,7 +26,6 @@
* @bug 8246774
* @summary Basic tests for prohibited magic serialization methods
* @library /test/lib
- * @enablePreview
* @run testng ProhibitedMethods
*/
diff --git a/test/jdk/java/io/Serializable/records/SerialPersistentFieldsTest.java b/test/jdk/java/io/Serializable/records/SerialPersistentFieldsTest.java
index 12a5fe8c402..16266806850 100644
--- a/test/jdk/java/io/Serializable/records/SerialPersistentFieldsTest.java
+++ b/test/jdk/java/io/Serializable/records/SerialPersistentFieldsTest.java
@@ -26,7 +26,6 @@
* @bug 8246774
* @summary Basic tests for prohibited magic serialPersistentFields
* @library /test/lib
- * @enablePreview
* @run testng SerialPersistentFieldsTest
*/
diff --git a/test/jdk/java/lang/Class/getSimpleName/GetSimpleNameTest.java b/test/jdk/java/lang/Class/getSimpleName/GetSimpleNameTest.java
index 34ce8f46663..7d5ef130c82 100644
--- a/test/jdk/java/lang/Class/getSimpleName/GetSimpleNameTest.java
+++ b/test/jdk/java/lang/Class/getSimpleName/GetSimpleNameTest.java
@@ -24,7 +24,6 @@
/* @test
* @bug 8057919
* @summary Class.getSimpleName() should work for non-JLS compliant class names
- * @enablePreview
*/
import java.lang.classfile.ClassBuilder;
diff --git a/test/jdk/java/lang/ModuleTests/AnnotationsTest.java b/test/jdk/java/lang/ModuleTests/AnnotationsTest.java
index 1fffe710ce5..5ccdecd8734 100644
--- a/test/jdk/java/lang/ModuleTests/AnnotationsTest.java
+++ b/test/jdk/java/lang/ModuleTests/AnnotationsTest.java
@@ -49,7 +49,6 @@
/**
* @test
- * @enablePreview
* @modules java.base/jdk.internal.module
* @library /test/lib
* @build jdk.test.lib.util.ModuleInfoWriter
diff --git a/test/jdk/java/lang/StackWalker/TestBCI.java b/test/jdk/java/lang/StackWalker/TestBCI.java
index 4d5e6a6eaf4..0379a0199c4 100644
--- a/test/jdk/java/lang/StackWalker/TestBCI.java
+++ b/test/jdk/java/lang/StackWalker/TestBCI.java
@@ -25,7 +25,6 @@
* @test
* @bug 8140450
* @summary Basic test for the StackWalker::getByteCodeIndex method
- * @enablePreview
* @run main TestBCI
*/
diff --git a/test/jdk/java/lang/annotation/AnnotationTypeMismatchException/AnnotationTypeMismatchTest.java b/test/jdk/java/lang/annotation/AnnotationTypeMismatchException/AnnotationTypeMismatchTest.java
index 9c6bfabf82b..51dcf1bb913 100644
--- a/test/jdk/java/lang/annotation/AnnotationTypeMismatchException/AnnotationTypeMismatchTest.java
+++ b/test/jdk/java/lang/annotation/AnnotationTypeMismatchException/AnnotationTypeMismatchTest.java
@@ -26,7 +26,6 @@
* @bug 8228988 8266598
* @summary An annotation-typed property of an annotation that is represented as an
* incompatible property of another type should yield an AnnotationTypeMismatchException.
- * @enablePreview
* @run main AnnotationTypeMismatchTest
*/
diff --git a/test/jdk/java/lang/annotation/AnnotationTypeMismatchException/ArityTypeMismatchTest.java b/test/jdk/java/lang/annotation/AnnotationTypeMismatchException/ArityTypeMismatchTest.java
index e8908b05ffa..30c2c7864c6 100644
--- a/test/jdk/java/lang/annotation/AnnotationTypeMismatchException/ArityTypeMismatchTest.java
+++ b/test/jdk/java/lang/annotation/AnnotationTypeMismatchException/ArityTypeMismatchTest.java
@@ -27,7 +27,6 @@
* @summary Annotation property which is compiled as an array property but
* changed observed as a singular element should throw an
* AnnotationTypeMismatchException
- * @enablePreview
* @run main ArityTypeMismatchTest
*/
diff --git a/test/jdk/java/lang/annotation/AnnotationTypeMismatchException/ArrayTypeMismatchTest.java b/test/jdk/java/lang/annotation/AnnotationTypeMismatchException/ArrayTypeMismatchTest.java
index 15897b1ca51..4b92ea4361c 100644
--- a/test/jdk/java/lang/annotation/AnnotationTypeMismatchException/ArrayTypeMismatchTest.java
+++ b/test/jdk/java/lang/annotation/AnnotationTypeMismatchException/ArrayTypeMismatchTest.java
@@ -26,7 +26,6 @@
* @bug 8266766
* @summary An array property of a type that is no longer of a type that is a legal member of an
* annotation should throw an AnnotationTypeMismatchException.
- * @enablePreview
* @run main ArrayTypeMismatchTest
*/
diff --git a/test/jdk/java/lang/annotation/AnnotationTypeMismatchException/EnumTypeMismatchTest.java b/test/jdk/java/lang/annotation/AnnotationTypeMismatchException/EnumTypeMismatchTest.java
index 43e62c66e9b..32555aefde2 100644
--- a/test/jdk/java/lang/annotation/AnnotationTypeMismatchException/EnumTypeMismatchTest.java
+++ b/test/jdk/java/lang/annotation/AnnotationTypeMismatchException/EnumTypeMismatchTest.java
@@ -26,7 +26,6 @@
* @bug 8228988 8266598
* @summary An enumeration-typed property of an annotation that is represented as an
* incompatible property of another type should yield an AnnotationTypeMismatchException.
- * @enablePreview
* @run main EnumTypeMismatchTest
*/
diff --git a/test/jdk/java/lang/annotation/AnnotationVerifier.java b/test/jdk/java/lang/annotation/AnnotationVerifier.java
index 012f8ef2b1c..eab3d1ffa08 100644
--- a/test/jdk/java/lang/annotation/AnnotationVerifier.java
+++ b/test/jdk/java/lang/annotation/AnnotationVerifier.java
@@ -40,7 +40,6 @@
* @bug 8158510
* @summary Verify valid annotation
* @modules java.base/sun.reflect.annotation
- * @enablePreview
* @clean AnnotationWithVoidReturn AnnotationWithParameter
* AnnotationWithExtraInterface AnnotationWithException
* AnnotationWithHashCode AnnotationWithDefaultMember
diff --git a/test/jdk/java/lang/instrument/NativeMethodPrefixApp.java b/test/jdk/java/lang/instrument/NativeMethodPrefixApp.java
index 97cf4fde2f1..36f0b95d46f 100644
--- a/test/jdk/java/lang/instrument/NativeMethodPrefixApp.java
+++ b/test/jdk/java/lang/instrument/NativeMethodPrefixApp.java
@@ -38,8 +38,6 @@
* @library /test/lib
* @build bootreporter.StringIdCallback bootreporter.StringIdCallbackReporter
* asmlib.Instrumentor NativeMethodPrefixAgent
- * @enablePreview
- * @comment The test uses asmlib/Instrumentor.java which relies on ClassFile API PreviewFeature.
* @run main/native NativeMethodPrefixApp roleDriver
*/
public class NativeMethodPrefixApp implements StringIdCallback {
@@ -87,7 +85,6 @@ private static Path createAgentJar() throws Exception {
private static void launchApp(final Path agentJar) throws Exception {
final OutputAnalyzer oa = ProcessTools.executeTestJava(
- "--enable-preview", // due to usage of ClassFile API PreviewFeature in the agent
"-javaagent:" + agentJar.toString(),
"-Djava.library.path=" + testLibraryPath,
NativeMethodPrefixApp.class.getName());
diff --git a/test/jdk/java/lang/instrument/RetransformApp.java b/test/jdk/java/lang/instrument/RetransformApp.java
index f3d01b17b26..a026952b29f 100644
--- a/test/jdk/java/lang/instrument/RetransformApp.java
+++ b/test/jdk/java/lang/instrument/RetransformApp.java
@@ -37,8 +37,6 @@
* @modules java.instrument
* @library /test/lib
* @build RetransformAgent asmlib.Instrumentor
- * @enablePreview
- * @comment The test uses asmlib/Instrumentor.java which relies on ClassFile API PreviewFeature.
* @run driver/timeout=240 RetransformApp roleDriver
* @comment The test uses a higher timeout to prevent test timeouts noted in JDK-6528548
*/
@@ -78,7 +76,6 @@ private static Path createAgentJar() throws Exception {
private static void launchApp(final Path agentJar) throws Exception {
final OutputAnalyzer oa = ProcessTools.executeTestJava(
- "--enable-preview", // due to usage of ClassFile API PreviewFeature in the agent
"-javaagent:" + agentJar.toString(),
RetransformApp.class.getName());
oa.shouldHaveExitValue(0);
diff --git a/test/jdk/java/lang/invoke/8022701/MHIllegalAccess.java b/test/jdk/java/lang/invoke/8022701/MHIllegalAccess.java
index 896e29439e9..23eb2ced6f4 100644
--- a/test/jdk/java/lang/invoke/8022701/MHIllegalAccess.java
+++ b/test/jdk/java/lang/invoke/8022701/MHIllegalAccess.java
@@ -25,7 +25,6 @@
* @test
* @bug 8022701
* @summary Illegal access exceptions via methodhandle invocations threw wrong error.
- * @enablePreview
* @compile -XDignore.symbol.file BogoLoader.java InvokeSeveralWays.java MHIllegalAccess.java MethodSupplier.java
* @run main/othervm MHIllegalAccess
*/
diff --git a/test/jdk/java/lang/invoke/DefineClassTest.java b/test/jdk/java/lang/invoke/DefineClassTest.java
index 6a9ee82de39..9702a9f0f98 100644
--- a/test/jdk/java/lang/invoke/DefineClassTest.java
+++ b/test/jdk/java/lang/invoke/DefineClassTest.java
@@ -23,7 +23,6 @@
/* @test
* @modules java.base/java.lang:open
- * @enablePreview
* @run testng/othervm test.DefineClassTest
* @summary Basic test for java.lang.invoke.MethodHandles.Lookup.defineClass
*/
diff --git a/test/jdk/java/lang/invoke/MethodHandleProxies/BasicTest.java b/test/jdk/java/lang/invoke/MethodHandleProxies/BasicTest.java
index cd013f9f543..f5453f909e6 100644
--- a/test/jdk/java/lang/invoke/MethodHandleProxies/BasicTest.java
+++ b/test/jdk/java/lang/invoke/MethodHandleProxies/BasicTest.java
@@ -56,7 +56,6 @@
/*
* @test
* @bug 6983726 8206955 8269351
- * @enablePreview
* @summary Basic sanity tests for MethodHandleProxies
* @build BasicTest Client
* @run junit BasicTest
diff --git a/test/jdk/java/lang/invoke/MethodHandleProxies/WrapperHiddenClassTest.java b/test/jdk/java/lang/invoke/MethodHandleProxies/WrapperHiddenClassTest.java
index 3e1f0f41d6f..601250dcbe7 100644
--- a/test/jdk/java/lang/invoke/MethodHandleProxies/WrapperHiddenClassTest.java
+++ b/test/jdk/java/lang/invoke/MethodHandleProxies/WrapperHiddenClassTest.java
@@ -46,7 +46,6 @@
* @test
* @bug 6983726
* @library /test/lib
- * @enablePreview
* @summary Tests on implementation hidden classes spinned by MethodHandleProxies
* @build WrapperHiddenClassTest Client jdk.test.lib.util.ForceGC
* @run junit WrapperHiddenClassTest
diff --git a/test/jdk/java/lang/invoke/MethodHandles/classData/ClassDataTest.java b/test/jdk/java/lang/invoke/MethodHandles/classData/ClassDataTest.java
index af35d0edd03..faedbff07db 100644
--- a/test/jdk/java/lang/invoke/MethodHandles/classData/ClassDataTest.java
+++ b/test/jdk/java/lang/invoke/MethodHandles/classData/ClassDataTest.java
@@ -25,7 +25,6 @@
* @test
* @bug 8230501
* @library /test/lib
- * @enablePreview
* @run testng/othervm ClassDataTest
*/
diff --git a/test/jdk/java/lang/invoke/accessProtectedSuper/Test.java b/test/jdk/java/lang/invoke/accessProtectedSuper/Test.java
index 4ad03bb068a..bd72583e8be 100644
--- a/test/jdk/java/lang/invoke/accessProtectedSuper/Test.java
+++ b/test/jdk/java/lang/invoke/accessProtectedSuper/Test.java
@@ -25,7 +25,6 @@
* @test
* @bug 8022718
* @summary Runtime accessibility checking: protected class, if extended, should be accessible from another package
- * @enablePreview
* @compile -XDignore.symbol.file BogoLoader.java MethodInvoker.java Test.java anotherpkg/MethodSupplierOuter.java
* @run main/othervm Test
*/
diff --git a/test/jdk/java/lang/invoke/condy/BootstrapMethodJumboArgsTest.java b/test/jdk/java/lang/invoke/condy/BootstrapMethodJumboArgsTest.java
index 1dc30a8de59..5178e5b8669 100644
--- a/test/jdk/java/lang/invoke/condy/BootstrapMethodJumboArgsTest.java
+++ b/test/jdk/java/lang/invoke/condy/BootstrapMethodJumboArgsTest.java
@@ -27,7 +27,6 @@
* @summary Test bootstrap methods throwing an exception
* @library /java/lang/invoke/common
* @build test.java.lang.invoke.lib.InstructionHelper
- * @enablePreview
* @run testng BootstrapMethodJumboArgsTest
* @run testng/othervm -XX:+UnlockDiagnosticVMOptions -XX:UseBootstrapCallInfo=3 BootstrapMethodJumboArgsTest
*/
diff --git a/test/jdk/java/lang/invoke/condy/CondyBSMException.java b/test/jdk/java/lang/invoke/condy/CondyBSMException.java
index 3b0d59c3a01..ba20b9f2619 100644
--- a/test/jdk/java/lang/invoke/condy/CondyBSMException.java
+++ b/test/jdk/java/lang/invoke/condy/CondyBSMException.java
@@ -27,7 +27,6 @@
* @summary Test bootstrap methods throwing an exception
* @library /java/lang/invoke/common
* @build test.java.lang.invoke.lib.InstructionHelper
- * @enablePreview
* @run testng CondyBSMException
* @run testng/othervm -XX:+UnlockDiagnosticVMOptions -XX:UseBootstrapCallInfo=3 CondyBSMException
*/
diff --git a/test/jdk/java/lang/invoke/condy/CondyBSMInvocation.java b/test/jdk/java/lang/invoke/condy/CondyBSMInvocation.java
index 14eb7560a7d..e86c6ea25f5 100644
--- a/test/jdk/java/lang/invoke/condy/CondyBSMInvocation.java
+++ b/test/jdk/java/lang/invoke/condy/CondyBSMInvocation.java
@@ -27,7 +27,6 @@
* @summary Test basic invocation of bootstrap methods
* @library /java/lang/invoke/common
* @build test.java.lang.invoke.lib.InstructionHelper
- * @enablePreview
* @run testng CondyBSMInvocation
* @run testng/othervm -XX:+UnlockDiagnosticVMOptions -XX:UseBootstrapCallInfo=3 CondyBSMInvocation
*/
diff --git a/test/jdk/java/lang/invoke/condy/CondyBSMValidationTest.java b/test/jdk/java/lang/invoke/condy/CondyBSMValidationTest.java
index 5cfe85d0642..16558a9772b 100644
--- a/test/jdk/java/lang/invoke/condy/CondyBSMValidationTest.java
+++ b/test/jdk/java/lang/invoke/condy/CondyBSMValidationTest.java
@@ -27,7 +27,6 @@
* @summary Test invalid name in name and type
* @library /java/lang/invoke/common
* @build test.java.lang.invoke.lib.InstructionHelper
- * @enablePreview
* @run testng CondyBSMValidationTest
* @run testng/othervm -XX:+UnlockDiagnosticVMOptions -XX:UseBootstrapCallInfo=3 CondyBSMValidationTest
*/
diff --git a/test/jdk/java/lang/invoke/condy/CondyInterfaceWithOverpassMethods.java b/test/jdk/java/lang/invoke/condy/CondyInterfaceWithOverpassMethods.java
index 2b2fb159e3e..8e9b2c6ae1f 100644
--- a/test/jdk/java/lang/invoke/condy/CondyInterfaceWithOverpassMethods.java
+++ b/test/jdk/java/lang/invoke/condy/CondyInterfaceWithOverpassMethods.java
@@ -27,7 +27,6 @@
* @summary Test for an interface using condy with default overpass methods
* @library /java/lang/invoke/common
* @build test.java.lang.invoke.lib.InstructionHelper
- * @enablePreview
* @run testng CondyInterfaceWithOverpassMethods
* @run testng/othervm -XX:+UnlockDiagnosticVMOptions -XX:UseBootstrapCallInfo=3 CondyInterfaceWithOverpassMethods
*/
diff --git a/test/jdk/java/lang/invoke/condy/CondyNameValidationTest.java b/test/jdk/java/lang/invoke/condy/CondyNameValidationTest.java
index 5f6e0dc04a2..32d7f16ac5f 100644
--- a/test/jdk/java/lang/invoke/condy/CondyNameValidationTest.java
+++ b/test/jdk/java/lang/invoke/condy/CondyNameValidationTest.java
@@ -27,7 +27,6 @@
* @summary Test invalid name in name and type
* @library /java/lang/invoke/common
* @build test.java.lang.invoke.lib.InstructionHelper
- * @enablePreview
* @run testng CondyNameValidationTest
* @run testng/othervm -XX:+UnlockDiagnosticVMOptions -XX:UseBootstrapCallInfo=3 CondyNameValidationTest
*/
diff --git a/test/jdk/java/lang/invoke/condy/CondyNestedTest.java b/test/jdk/java/lang/invoke/condy/CondyNestedTest.java
index 2cdbff4ffdd..9ec2a435b98 100644
--- a/test/jdk/java/lang/invoke/condy/CondyNestedTest.java
+++ b/test/jdk/java/lang/invoke/condy/CondyNestedTest.java
@@ -26,7 +26,6 @@
* @bug 8186046
* @summary Test nested dynamic constant declarations that are recursive
* @compile CondyNestedTest_Code.jcod
- * @enablePreview
* @run testng CondyNestedTest
* @run testng/othervm -XX:+UnlockDiagnosticVMOptions -XX:UseBootstrapCallInfo=3 CondyNestedTest
*/
diff --git a/test/jdk/java/lang/invoke/condy/CondyRepeatFailedResolution.java b/test/jdk/java/lang/invoke/condy/CondyRepeatFailedResolution.java
index f635bbfd59b..6463b5469ad 100644
--- a/test/jdk/java/lang/invoke/condy/CondyRepeatFailedResolution.java
+++ b/test/jdk/java/lang/invoke/condy/CondyRepeatFailedResolution.java
@@ -26,7 +26,6 @@
* @bug 8186211
* @summary Test basic invocation of multiple ldc's of the same dynamic constant that fail resolution
* @library /java/lang/invoke/common
- * @enablePreview
* @run testng CondyRepeatFailedResolution
* @run testng/othervm -XX:+UnlockDiagnosticVMOptions -XX:UseBootstrapCallInfo=3 CondyRepeatFailedResolution
*/
diff --git a/test/jdk/java/lang/invoke/condy/CondyReturnPrimitiveTest.java b/test/jdk/java/lang/invoke/condy/CondyReturnPrimitiveTest.java
index 057d5405516..3432ea95c4a 100644
--- a/test/jdk/java/lang/invoke/condy/CondyReturnPrimitiveTest.java
+++ b/test/jdk/java/lang/invoke/condy/CondyReturnPrimitiveTest.java
@@ -25,7 +25,6 @@
* @test
* @bug 8186046
* @summary Test for condy BSMs returning primitive values or null
- * @enablePreview
* @run testng CondyReturnPrimitiveTest
* @run testng/othervm -XX:+UnlockDiagnosticVMOptions -XX:UseBootstrapCallInfo=3 CondyReturnPrimitiveTest
*/
diff --git a/test/jdk/java/lang/invoke/condy/CondyStaticArgumentsTest.java b/test/jdk/java/lang/invoke/condy/CondyStaticArgumentsTest.java
index e488c35e778..d02ede56877 100644
--- a/test/jdk/java/lang/invoke/condy/CondyStaticArgumentsTest.java
+++ b/test/jdk/java/lang/invoke/condy/CondyStaticArgumentsTest.java
@@ -27,7 +27,6 @@
* @summary Test bootstrap arguments for condy
* @library /java/lang/invoke/common
* @build test.java.lang.invoke.lib.InstructionHelper
- * @enablePreview
* @run testng CondyStaticArgumentsTest
* @run testng/othervm -XX:+UnlockDiagnosticVMOptions -XX:UseBootstrapCallInfo=3 CondyStaticArgumentsTest
*/
diff --git a/test/jdk/java/lang/invoke/condy/CondyTypeValidationTest.java b/test/jdk/java/lang/invoke/condy/CondyTypeValidationTest.java
index 89db90efa14..34f43b09de7 100644
--- a/test/jdk/java/lang/invoke/condy/CondyTypeValidationTest.java
+++ b/test/jdk/java/lang/invoke/condy/CondyTypeValidationTest.java
@@ -27,7 +27,6 @@
* @summary Test invalid name in name and type
* @library /java/lang/invoke/common
* @build test.java.lang.invoke.lib.InstructionHelper
- * @enablePreview
* @run testng/othervm -XX:+UnlockDiagnosticVMOptions -XX:UseBootstrapCallInfo=3 CondyTypeValidationTest
*/
diff --git a/test/jdk/java/lang/invoke/condy/CondyWithGarbageTest.java b/test/jdk/java/lang/invoke/condy/CondyWithGarbageTest.java
index 766678f4686..4651b11b023 100644
--- a/test/jdk/java/lang/invoke/condy/CondyWithGarbageTest.java
+++ b/test/jdk/java/lang/invoke/condy/CondyWithGarbageTest.java
@@ -27,7 +27,6 @@
* @summary Stress test ldc to ensure HotSpot correctly manages oop maps
* @library /java/lang/invoke/common
* @build test.java.lang.invoke.lib.InstructionHelper
- * @enablePreview
* @run testng CondyWithGarbageTest
* @run testng/othervm -XX:+UnlockDiagnosticVMOptions -XX:UseBootstrapCallInfo=3 CondyWithGarbageTest
*/
diff --git a/test/jdk/java/lang/invoke/condy/CondyWrongType.java b/test/jdk/java/lang/invoke/condy/CondyWrongType.java
index 09ec64a3656..c2114da63f2 100644
--- a/test/jdk/java/lang/invoke/condy/CondyWrongType.java
+++ b/test/jdk/java/lang/invoke/condy/CondyWrongType.java
@@ -27,7 +27,6 @@
* @summary Test bootstrap methods returning the wrong type
* @library /java/lang/invoke/common
* @build test.java.lang.invoke.lib.InstructionHelper
- * @enablePreview
* @run testng CondyWrongType
* @run testng/othervm -XX:+UnlockDiagnosticVMOptions -XX:UseBootstrapCallInfo=3 CondyWrongType
*/
diff --git a/test/jdk/java/lang/invoke/condy/ConstantBootstrapsTest.java b/test/jdk/java/lang/invoke/condy/ConstantBootstrapsTest.java
index 9babd3b57d6..8b94d94663b 100644
--- a/test/jdk/java/lang/invoke/condy/ConstantBootstrapsTest.java
+++ b/test/jdk/java/lang/invoke/condy/ConstantBootstrapsTest.java
@@ -27,7 +27,6 @@
* @summary Test dynamic constant bootstraps
* @library /java/lang/invoke/common
* @build test.java.lang.invoke.lib.InstructionHelper
- * @enablePreview
* @run testng ConstantBootstrapsTest
* @run testng/othervm -XX:+UnlockDiagnosticVMOptions -XX:UseBootstrapCallInfo=3 ConstantBootstrapsTest
*/
diff --git a/test/jdk/java/lang/invoke/defineHiddenClass/BasicTest.java b/test/jdk/java/lang/invoke/defineHiddenClass/BasicTest.java
index 08138a86ed0..379ae765a6b 100644
--- a/test/jdk/java/lang/invoke/defineHiddenClass/BasicTest.java
+++ b/test/jdk/java/lang/invoke/defineHiddenClass/BasicTest.java
@@ -26,8 +26,6 @@
* @bug 8330467
* @modules jdk.compiler
* @library /test/lib
- * @enablePreview
- * @comment Change enablePreview with the flag in setup's compileSources
* @compile BadClassFile.jcod
* BadClassFile2.jcod
* BadClassFileVersion.jcod
@@ -79,8 +77,7 @@ public class BasicTest {
@BeforeTest
static void setup() throws IOException {
- compileSources(SRC_DIR, CLASSES_DIR, "--enable-preview",
- "--release", Integer.toString(Runtime.version().feature()));
+ compileSources(SRC_DIR, CLASSES_DIR);
hiddenClassBytes = Files.readAllBytes(CLASSES_DIR.resolve("HiddenClass.class"));
// compile with --release 10 with no NestHost and NestMembers attribute
diff --git a/test/jdk/java/lang/invoke/defineHiddenClass/HiddenNestmateTest.java b/test/jdk/java/lang/invoke/defineHiddenClass/HiddenNestmateTest.java
index 9043ce0fd85..63ed6327c43 100644
--- a/test/jdk/java/lang/invoke/defineHiddenClass/HiddenNestmateTest.java
+++ b/test/jdk/java/lang/invoke/defineHiddenClass/HiddenNestmateTest.java
@@ -24,7 +24,6 @@
/*
* @test
* @library /test/lib
- * @enablePreview
* @build HiddenNestmateTest
* @run testng/othervm HiddenNestmateTest
*/
diff --git a/test/jdk/java/lang/invoke/defineHiddenClass/StaticInvocableTest.java b/test/jdk/java/lang/invoke/defineHiddenClass/StaticInvocableTest.java
index 656da048db9..b6fa8e9c7aa 100644
--- a/test/jdk/java/lang/invoke/defineHiddenClass/StaticInvocableTest.java
+++ b/test/jdk/java/lang/invoke/defineHiddenClass/StaticInvocableTest.java
@@ -26,7 +26,6 @@
* @bug 8266925
* @summary hidden class members can't be statically invocable
* @modules java.base/jdk.internal.misc
- * @enablePreview
* @build java.base/*
* @run testng StaticInvocableTest
*/
diff --git a/test/jdk/java/lang/invoke/lambda/LambdaAsm.java b/test/jdk/java/lang/invoke/lambda/LambdaAsm.java
index 76d091cc51d..a379c809b87 100644
--- a/test/jdk/java/lang/invoke/lambda/LambdaAsm.java
+++ b/test/jdk/java/lang/invoke/lambda/LambdaAsm.java
@@ -26,7 +26,6 @@
* @bug 8027232
* @library /test/lib/
* @modules jdk.zipfs
- * @enablePreview
* @compile LambdaAsm.java
* @run main/othervm LambdaAsm
* @summary ensures that j.l.i.InvokerByteCodeGenerator and Class-File API
diff --git a/test/jdk/java/lang/invoke/lambda/LambdaStackTrace.java b/test/jdk/java/lang/invoke/lambda/LambdaStackTrace.java
index 0aa6d542588..97b13fea6c4 100644
--- a/test/jdk/java/lang/invoke/lambda/LambdaStackTrace.java
+++ b/test/jdk/java/lang/invoke/lambda/LambdaStackTrace.java
@@ -26,7 +26,6 @@
* @bug 8025636
* @library /test/lib/
* @modules jdk.compiler
- * @enablePreview
* @compile LambdaStackTrace.java
* @run main LambdaStackTrace
* @summary Synthetic frames should be hidden in exceptions
diff --git a/test/jdk/java/lang/invoke/lookup/SpecialStatic.java b/test/jdk/java/lang/invoke/lookup/SpecialStatic.java
index 4a44a898a77..f8c109d31f0 100644
--- a/test/jdk/java/lang/invoke/lookup/SpecialStatic.java
+++ b/test/jdk/java/lang/invoke/lookup/SpecialStatic.java
@@ -24,7 +24,6 @@
/* @test
* @bug 8032400
* @summary JSR292: invokeSpecial: InternalError attempting to lookup a method
- * @enablePreview
* @compile -XDignore.symbol.file SpecialStatic.java
* @run testng test.java.lang.invoke.lookup.SpecialStatic
*/
diff --git a/test/jdk/java/lang/module/ClassFileVersionsTest.java b/test/jdk/java/lang/module/ClassFileVersionsTest.java
index 1ffc5878651..683ec0b0ea2 100644
--- a/test/jdk/java/lang/module/ClassFileVersionsTest.java
+++ b/test/jdk/java/lang/module/ClassFileVersionsTest.java
@@ -23,7 +23,6 @@
/**
* @test
- * @enablePreview
* @modules java.base/jdk.internal.module
* @library /test/lib
* @build jdk.test.lib.util.ModuleInfoWriter
diff --git a/test/jdk/java/lang/module/ConfigurationTest.java b/test/jdk/java/lang/module/ConfigurationTest.java
index 2f2131b3fc2..81a2b155ea1 100644
--- a/test/jdk/java/lang/module/ConfigurationTest.java
+++ b/test/jdk/java/lang/module/ConfigurationTest.java
@@ -23,7 +23,6 @@
/**
* @test
- * @enablePreview
* @modules java.base/jdk.internal.access
* java.base/jdk.internal.module
* @library /test/lib
diff --git a/test/jdk/java/lang/module/ModuleDescriptorTest.java b/test/jdk/java/lang/module/ModuleDescriptorTest.java
index c46bb4a1e9e..f8f7eb8a1f4 100644
--- a/test/jdk/java/lang/module/ModuleDescriptorTest.java
+++ b/test/jdk/java/lang/module/ModuleDescriptorTest.java
@@ -24,7 +24,6 @@
/**
* @test
* @bug 8142968 8158456 8298875
- * @enablePreview
* @modules java.base/jdk.internal.access
* java.base/jdk.internal.module
* @library /test/lib
diff --git a/test/jdk/java/lang/module/ModuleFinderTest.java b/test/jdk/java/lang/module/ModuleFinderTest.java
index df7a17954b6..a98645123a0 100644
--- a/test/jdk/java/lang/module/ModuleFinderTest.java
+++ b/test/jdk/java/lang/module/ModuleFinderTest.java
@@ -23,7 +23,6 @@
/**
* @test
- * @enablePreview
* @modules java.base/jdk.internal.module
* @library /test/lib
* @build ModuleFinderTest jdk.test.lib.util.ModuleInfoWriter
diff --git a/test/jdk/java/lang/module/ModuleNamesTest.java b/test/jdk/java/lang/module/ModuleNamesTest.java
index 3b8b9ddcafc..30374bf8bfb 100644
--- a/test/jdk/java/lang/module/ModuleNamesTest.java
+++ b/test/jdk/java/lang/module/ModuleNamesTest.java
@@ -23,7 +23,6 @@
/**
* @test
- * @enablePreview
* @modules java.base/jdk.internal.access
* java.base/jdk.internal.module
* @library /test/lib
diff --git a/test/jdk/java/lang/module/MultiReleaseJarTest.java b/test/jdk/java/lang/module/MultiReleaseJarTest.java
index 53180174b85..93d25cc06a3 100644
--- a/test/jdk/java/lang/module/MultiReleaseJarTest.java
+++ b/test/jdk/java/lang/module/MultiReleaseJarTest.java
@@ -23,7 +23,6 @@
/**
* @test
- * @enablePreview
* @modules java.base/jdk.internal.module
* @library /test/lib
* @build MultiReleaseJarTest
diff --git a/test/jdk/java/lang/reflect/Generics/TestMissingTypeVariable.java b/test/jdk/java/lang/reflect/Generics/TestMissingTypeVariable.java
index 64f1457bdf7..426b005a4cc 100644
--- a/test/jdk/java/lang/reflect/Generics/TestMissingTypeVariable.java
+++ b/test/jdk/java/lang/reflect/Generics/TestMissingTypeVariable.java
@@ -25,7 +25,6 @@
* @test
* @library /test/lib
* @bug 8337302
- * @enablePreview
* @summary Tests that an exception is thrown if a type variable is not declared
*/
diff --git a/test/jdk/java/lang/reflect/Method/invoke/TestPrivateInterfaceMethodReflect.java b/test/jdk/java/lang/reflect/Method/invoke/TestPrivateInterfaceMethodReflect.java
index 2b19189ceed..6c5e55aae18 100644
--- a/test/jdk/java/lang/reflect/Method/invoke/TestPrivateInterfaceMethodReflect.java
+++ b/test/jdk/java/lang/reflect/Method/invoke/TestPrivateInterfaceMethodReflect.java
@@ -26,7 +26,6 @@
* @bug 8026213
* @summary Reflection support for private methods in interfaces
* @author Robert Field
- * @enablePreview
* @run main TestPrivateInterfaceMethodReflect
*/
diff --git a/test/jdk/java/lang/reflect/records/IsRecordTest.java b/test/jdk/java/lang/reflect/records/IsRecordTest.java
index fc5f9e28364..4888e6d506e 100644
--- a/test/jdk/java/lang/reflect/records/IsRecordTest.java
+++ b/test/jdk/java/lang/reflect/records/IsRecordTest.java
@@ -25,7 +25,6 @@
* @test
* @bug 8255560
* @summary Class::isRecord should check that the current class is final and not abstract
- * @enablePreview
* @library /test/lib
* @run testng/othervm IsRecordTest
*/
diff --git a/test/jdk/java/lang/runtime/ExactnessConversionsSupportTest.java b/test/jdk/java/lang/runtime/ExactnessConversionsSupportTest.java
index 8c862ae729b..6e1ef8e4c9f 100644
--- a/test/jdk/java/lang/runtime/ExactnessConversionsSupportTest.java
+++ b/test/jdk/java/lang/runtime/ExactnessConversionsSupportTest.java
@@ -44,8 +44,6 @@
* @test
* @bug 8304487
* @summary Verify boundary and special cases of exact conversion predicates
- * @enablePreview
- * @modules java.base/jdk.internal.classfile
* @compile ExactnessConversionsSupportTest.java
* @run testng/othervm ExactnessConversionsSupportTest
*/
diff --git a/test/jdk/java/lang/runtime/SwitchBootstrapsTest.java b/test/jdk/java/lang/runtime/SwitchBootstrapsTest.java
index 4d79f62a01d..f02b6b5f6e9 100644
--- a/test/jdk/java/lang/runtime/SwitchBootstrapsTest.java
+++ b/test/jdk/java/lang/runtime/SwitchBootstrapsTest.java
@@ -46,7 +46,6 @@
* @test
* @bug 8318144
* @enablePreview
- * @modules java.base/jdk.internal.classfile
* @compile SwitchBootstrapsTest.java
* @run testng/othervm SwitchBootstrapsTest
*/
diff --git a/test/jdk/java/security/Provider/SecurityProviderModularTest.java b/test/jdk/java/security/Provider/SecurityProviderModularTest.java
index 5bcf9a73301..b803354757f 100644
--- a/test/jdk/java/security/Provider/SecurityProviderModularTest.java
+++ b/test/jdk/java/security/Provider/SecurityProviderModularTest.java
@@ -47,7 +47,6 @@
* @bug 8130360 8183310
* @summary Test security provider in different combination of modular option
* defined with(out) service description.
- * @enablePreview
* @modules java.base/jdk.internal.module
* @library /test/lib
* @build jdk.test.lib.util.JarUtils
diff --git a/test/jdk/java/time/nontestng/java/time/chrono/HijrahConfigTest.java b/test/jdk/java/time/nontestng/java/time/chrono/HijrahConfigTest.java
index b76848e4bb1..6a63fc46226 100644
--- a/test/jdk/java/time/nontestng/java/time/chrono/HijrahConfigTest.java
+++ b/test/jdk/java/time/nontestng/java/time/chrono/HijrahConfigTest.java
@@ -35,7 +35,6 @@
* @bug 8187987
* @requires (vm.compMode != "Xcomp" & os.maxMemory >= 2g)
* @library /tools/lib /test/lib
- * @enablePreview
* @modules java.base/jdk.internal.jimage
* jdk.jlink/jdk.tools.jimage
* jdk.compiler
diff --git a/test/jdk/java/util/ServiceLoader/BadProvidersTest.java b/test/jdk/java/util/ServiceLoader/BadProvidersTest.java
index 7a42854cb9e..6a1b3a72004 100644
--- a/test/jdk/java/util/ServiceLoader/BadProvidersTest.java
+++ b/test/jdk/java/util/ServiceLoader/BadProvidersTest.java
@@ -25,7 +25,6 @@
* @test
* @library /test/lib
* @modules jdk.compiler
- * @enablePreview
* @build jdk.test.lib.compiler.CompilerUtils
* @run testng/othervm BadProvidersTest
* @summary Basic test of ServiceLoader with bad provider and bad provider
diff --git a/test/jdk/javax/security/auth/login/modules/JaasModularClientTest.java b/test/jdk/javax/security/auth/login/modules/JaasModularClientTest.java
index 7869c10282a..34c08c410aa 100644
--- a/test/jdk/javax/security/auth/login/modules/JaasModularClientTest.java
+++ b/test/jdk/javax/security/auth/login/modules/JaasModularClientTest.java
@@ -43,7 +43,6 @@
* @test
* @bug 8078813 8183310
* @summary Test custom JAAS login module with all possible modular option.
- * @enablePreview
* @modules java.base/jdk.internal.module
* @library /test/lib
* @build jdk.test.lib.util.JarUtils jdk.test.lib.util.ModuleInfoWriter
diff --git a/test/jdk/jdk/classfile/ClassHierarchyInfoTest.java b/test/jdk/jdk/classfile/ClassHierarchyInfoTest.java
index d4a9e3a4297..464400c5e8a 100644
--- a/test/jdk/jdk/classfile/ClassHierarchyInfoTest.java
+++ b/test/jdk/jdk/classfile/ClassHierarchyInfoTest.java
@@ -23,7 +23,6 @@
/*
* @test
- * @enablePreview
* @modules java.base/jdk.internal.classfile.impl
* java.base/java.util:open
* @comment Opens java.util so HashMap bytecode generation can access its nested
diff --git a/test/jdk/jdk/classfile/SnippetsTest.java b/test/jdk/jdk/classfile/SnippetsTest.java
index 51a73b93d67..f6fa2281e14 100644
--- a/test/jdk/jdk/classfile/SnippetsTest.java
+++ b/test/jdk/jdk/classfile/SnippetsTest.java
@@ -53,8 +53,7 @@ void testSnippet(String source) throws Exception {
var compilationUnits = fileManager.getJavaFileObjectsFromFiles(List.of(src));
fileManager.setLocation(StandardLocation.CLASS_OUTPUT,
List.of(Paths.get(System.getProperty("test.classes", ".")).toFile()));
- List flags = List.of(
- "--source", String.valueOf(Runtime.version().feature()));
+ List flags = List.of();
if (source.contains("jdk/internal/classfile/components")) {
flags = new ArrayList<>(flags);
flags.add("--add-exports");
diff --git a/test/jdk/jdk/classfile/TEST.properties b/test/jdk/jdk/classfile/TEST.properties
index 296312b258f..62414b36eae 100644
--- a/test/jdk/jdk/classfile/TEST.properties
+++ b/test/jdk/jdk/classfile/TEST.properties
@@ -1,5 +1,4 @@
maxOutputSize = 2500000
-enablePreview = true
modules = \
java.base/jdk.internal.classfile.components \
java.base/jdk.internal.classfile.impl \
diff --git a/test/jdk/jdk/classfile/VerifierSelfTest.java b/test/jdk/jdk/classfile/VerifierSelfTest.java
index bc4ad5ab4ef..80ee89d5fda 100644
--- a/test/jdk/jdk/classfile/VerifierSelfTest.java
+++ b/test/jdk/jdk/classfile/VerifierSelfTest.java
@@ -25,7 +25,6 @@
* @test
* @summary Testing ClassFile Verifier.
* @bug 8333812
- * @enablePreview
* @run junit VerifierSelfTest
*/
import java.io.IOException;
diff --git a/test/jdk/jdk/internal/reflect/CallerSensitive/CallerSensitiveFinder.java b/test/jdk/jdk/internal/reflect/CallerSensitive/CallerSensitiveFinder.java
index 2d5175dcf3f..65e65bf0858 100644
--- a/test/jdk/jdk/internal/reflect/CallerSensitive/CallerSensitiveFinder.java
+++ b/test/jdk/jdk/internal/reflect/CallerSensitive/CallerSensitiveFinder.java
@@ -51,7 +51,6 @@
* @bug 8010117
* @summary Verify if CallerSensitive methods are annotated with
* CallerSensitive annotation
- * @enablePreview
* @build CallerSensitiveFinder
* @run main/othervm/timeout=900 CallerSensitiveFinder
*/
diff --git a/test/jdk/jdk/internal/reflect/CallerSensitive/CheckCSMs.java b/test/jdk/jdk/internal/reflect/CallerSensitive/CheckCSMs.java
index 83841fe104b..e1790e6e174 100644
--- a/test/jdk/jdk/internal/reflect/CallerSensitive/CheckCSMs.java
+++ b/test/jdk/jdk/internal/reflect/CallerSensitive/CheckCSMs.java
@@ -58,7 +58,6 @@
* @test
* @summary CallerSensitive methods should be static or final instance
* methods except the known list of non-final instance methods
- * @enablePreview
* @build CheckCSMs
* @run main/othervm/timeout=900 CheckCSMs
*/
diff --git a/test/jdk/jdk/internal/reflect/CallerSensitive/MissingCallerSensitive.java b/test/jdk/jdk/internal/reflect/CallerSensitive/MissingCallerSensitive.java
index 781c75b23ae..e8994c3c760 100644
--- a/test/jdk/jdk/internal/reflect/CallerSensitive/MissingCallerSensitive.java
+++ b/test/jdk/jdk/internal/reflect/CallerSensitive/MissingCallerSensitive.java
@@ -27,7 +27,6 @@
* @bug 8010117
* @summary Test CallerSensitiveFinder to find missing annotation
* @modules java.base/jdk.internal.reflect
- * @enablePreview
* @compile -XDignore.symbol.file MissingCallerSensitive.java
* @build CallerSensitiveFinder
* @run main MissingCallerSensitive
diff --git a/test/jdk/jdk/jfr/event/compiler/TestCompilerInlining.java b/test/jdk/jdk/jfr/event/compiler/TestCompilerInlining.java
index b13fa714109..2d0ce579dd8 100644
--- a/test/jdk/jdk/jfr/event/compiler/TestCompilerInlining.java
+++ b/test/jdk/jdk/jfr/event/compiler/TestCompilerInlining.java
@@ -61,7 +61,6 @@
* @requires vm.opt.Inline == true | vm.opt.Inline == null
* @library /test/lib
* @modules jdk.jfr
- * @enablePreview
*
* @build jdk.test.whitebox.WhiteBox
* @run driver jdk.test.lib.helpers.ClassFileInstaller jdk.test.whitebox.WhiteBox
diff --git a/test/jdk/jdk/jfr/event/io/TestInstrumentation.java b/test/jdk/jdk/jfr/event/io/TestInstrumentation.java
index daa3d0162d4..beef8437a34 100644
--- a/test/jdk/jdk/jfr/event/io/TestInstrumentation.java
+++ b/test/jdk/jdk/jfr/event/io/TestInstrumentation.java
@@ -58,8 +58,6 @@
* @modules java.instrument
* jdk.jartool/sun.tools.jar
* jdk.jfr
- * @enablePreview
- * @comment update --enable-preview in launchTest() too
*
* @run main/othervm jdk.jfr.event.io.TestInstrumentation
*/
@@ -281,7 +279,6 @@ private static void launchTest() throws Throwable {
String[] args = {
"-Xbootclasspath/a:" + testClassDir + "InstrumentationCallback.jar",
- "--enable-preview",
"-classpath", classpath,
"-javaagent:" + testClassDir + "TestInstrumentation.jar",
"jdk.jfr.event.io.TestInstrumentation$TestMain" };
diff --git a/test/jdk/jdk/jfr/javaagent/TestEventInstrumentation.java b/test/jdk/jdk/jfr/javaagent/TestEventInstrumentation.java
index 049a1172d0c..d5997f1ad46 100644
--- a/test/jdk/jdk/jfr/javaagent/TestEventInstrumentation.java
+++ b/test/jdk/jdk/jfr/javaagent/TestEventInstrumentation.java
@@ -52,7 +52,6 @@
* @requires vm.hasJFR
* @library /test/lib
* @modules jdk.jartool/sun.tools.jar
- * @enablePreview
* @build jdk.jfr.javaagent.InstrumentationEventCallback
* jdk.jfr.javaagent.TestEventInstrumentation
* @run driver jdk.test.lib.util.JavaAgentBuilder
diff --git a/test/jdk/jdk/lambda/TEST.properties b/test/jdk/jdk/lambda/TEST.properties
index d6687af079f..eaae109a7fc 100644
--- a/test/jdk/jdk/lambda/TEST.properties
+++ b/test/jdk/jdk/lambda/TEST.properties
@@ -4,4 +4,3 @@ TestNG.dirs = .
maxOutputSize = 250000
modules = jdk.compiler jdk.zipfs
-enablePreview = true
\ No newline at end of file
diff --git a/test/jdk/jdk/modules/incubator/ServiceBinding.java b/test/jdk/jdk/modules/incubator/ServiceBinding.java
index 1252b908178..95eadfffa4c 100644
--- a/test/jdk/jdk/modules/incubator/ServiceBinding.java
+++ b/test/jdk/jdk/modules/incubator/ServiceBinding.java
@@ -24,7 +24,6 @@
/**
* @test
* @bug 8233922
- * @enablePreview
* @modules java.base/jdk.internal.module
* @library /test/lib
* @build ServiceBinding TestBootLayer jdk.test.lib.util.ModuleInfoWriter
diff --git a/test/jdk/sun/tools/jcmd/TestProcessHelper.java b/test/jdk/sun/tools/jcmd/TestProcessHelper.java
index 73f04563cc9..9d9b34dad41 100644
--- a/test/jdk/sun/tools/jcmd/TestProcessHelper.java
+++ b/test/jdk/sun/tools/jcmd/TestProcessHelper.java
@@ -54,7 +54,6 @@
*
* @requires vm.flagless
* @requires os.family == "linux"
- * @enablePreview
* @modules jdk.jcmd/sun.tools.common:+open
* java.base/jdk.internal.module
* @library /test/lib
diff --git a/test/jdk/tools/jimage/JImageNonAsciiNameTest.java b/test/jdk/tools/jimage/JImageNonAsciiNameTest.java
index c50a10539fc..e5a961bf366 100644
--- a/test/jdk/tools/jimage/JImageNonAsciiNameTest.java
+++ b/test/jdk/tools/jimage/JImageNonAsciiNameTest.java
@@ -37,7 +37,6 @@
* @summary Test non-ASCII path in custom JRE
* @library ../lib
* /test/lib
- * @enablePreview
* @modules java.base/jdk.internal.jimage
* jdk.jlink/jdk.tools.jimage
* @build tests.*
diff --git a/test/jdk/tools/jimage/JImageTest.java b/test/jdk/tools/jimage/JImageTest.java
index 3342c566025..d36b727d872 100644
--- a/test/jdk/tools/jimage/JImageTest.java
+++ b/test/jdk/tools/jimage/JImageTest.java
@@ -47,7 +47,6 @@
* @summary Test jimage tool
* @bug 8222100
* @library ../lib
- * @enablePreview
* @modules java.base/jdk.internal.jimage
* jdk.jlink/jdk.tools.jmod
* jdk.jlink/jdk.tools.jimage
diff --git a/test/jdk/tools/jlink/DefaultProviderTest.java b/test/jdk/tools/jlink/DefaultProviderTest.java
index 3177b37666a..65d2b684313 100644
--- a/test/jdk/tools/jlink/DefaultProviderTest.java
+++ b/test/jdk/tools/jlink/DefaultProviderTest.java
@@ -42,7 +42,6 @@
* @author Jean-Francois Denise
* @requires vm.compMode != "Xcomp"
* @library ../lib
- * @enablePreview
* @modules java.base/jdk.internal.jimage
* jdk.jlink/jdk.tools.jlink.internal
* jdk.jlink/jdk.tools.jlink.plugin
diff --git a/test/jdk/tools/jlink/ExplodedModuleNameTest.java b/test/jdk/tools/jlink/ExplodedModuleNameTest.java
index 69a564c7538..c3b992adafa 100644
--- a/test/jdk/tools/jlink/ExplodedModuleNameTest.java
+++ b/test/jdk/tools/jlink/ExplodedModuleNameTest.java
@@ -38,7 +38,6 @@
* @bug 8192986
* @summary Inconsistent handling of exploded modules in jlink
* @library ../lib
- * @enablePreview
* @modules java.base/jdk.internal.jimage
* jdk.jlink/jdk.tools.jlink.internal
* jdk.jlink/jdk.tools.jmod
diff --git a/test/jdk/tools/jlink/IntegrationTest.java b/test/jdk/tools/jlink/IntegrationTest.java
index 686dd194ada..d79752f6d56 100644
--- a/test/jdk/tools/jlink/IntegrationTest.java
+++ b/test/jdk/tools/jlink/IntegrationTest.java
@@ -57,7 +57,6 @@
* @summary Test integration API
* @author Jean-Francois Denise
* @library ../lib
- * @enablePreview
* @modules java.base/jdk.internal.jimage
* jdk.jlink/jdk.tools.jlink.builder
* jdk.jlink/jdk.tools.jlink.internal
diff --git a/test/jdk/tools/jlink/JLink100Modules.java b/test/jdk/tools/jlink/JLink100Modules.java
index bb4f18cb4e8..6aa3007ed45 100644
--- a/test/jdk/tools/jlink/JLink100Modules.java
+++ b/test/jdk/tools/jlink/JLink100Modules.java
@@ -35,7 +35,6 @@
* @summary Make sure that 100 modules can be linked using jlink.
* @bug 8240567
* @library ../lib
- * @enablePreview
* @modules java.base/jdk.internal.jimage
* jdk.jlink/jdk.tools.jlink.internal
* jdk.jlink/jdk.tools.jlink.plugin
diff --git a/test/jdk/tools/jlink/JLink2Test.java b/test/jdk/tools/jlink/JLink2Test.java
index 1e0fe693489..f00def47b17 100644
--- a/test/jdk/tools/jlink/JLink2Test.java
+++ b/test/jdk/tools/jlink/JLink2Test.java
@@ -26,7 +26,6 @@
* @summary Test image creation
* @author Jean-Francois Denise
* @library ../lib
- * @enablePreview
* @modules java.base/jdk.internal.jimage
* jdk.jlink/jdk.tools.jlink.internal
* jdk.jlink/jdk.tools.jlink.plugin
diff --git a/test/jdk/tools/jlink/JLinkDedupTestBatchSizeOne.java b/test/jdk/tools/jlink/JLinkDedupTestBatchSizeOne.java
index c7af8865a79..fbdbc6e3ba4 100644
--- a/test/jdk/tools/jlink/JLinkDedupTestBatchSizeOne.java
+++ b/test/jdk/tools/jlink/JLinkDedupTestBatchSizeOne.java
@@ -38,7 +38,6 @@
* @bug 8311591
* @library /test/lib
* ../lib
- * @enablePreview
* @modules java.base/jdk.internal.jimage
* jdk.jlink/jdk.tools.jlink.internal
* jdk.jlink/jdk.tools.jlink.plugin
diff --git a/test/jdk/tools/jlink/JLinkNegativeTest.java b/test/jdk/tools/jlink/JLinkNegativeTest.java
index 6f88c02b0c8..bf7798ffa3a 100644
--- a/test/jdk/tools/jlink/JLinkNegativeTest.java
+++ b/test/jdk/tools/jlink/JLinkNegativeTest.java
@@ -28,7 +28,6 @@
* @bug 8174718
* @bug 8189671
* @author Andrei Eremeev
- * @enablePreview
* @modules java.base/jdk.internal.jimage
* java.base/jdk.internal.module
* jdk.jlink/jdk.tools.jlink.internal
diff --git a/test/jdk/tools/jlink/JLinkOptionsTest.java b/test/jdk/tools/jlink/JLinkOptionsTest.java
index 95b4268069d..892a3891d77 100644
--- a/test/jdk/tools/jlink/JLinkOptionsTest.java
+++ b/test/jdk/tools/jlink/JLinkOptionsTest.java
@@ -36,7 +36,6 @@
* @summary Test jlink options
* @author Jean-Francois Denise
* @library ../lib
- * @enablePreview
* @modules java.base/jdk.internal.jimage
* jdk.jlink/jdk.tools.jlink.internal
* jdk.jlink/jdk.tools.jlink.plugin
diff --git a/test/jdk/tools/jlink/JLinkPluginsTest.java b/test/jdk/tools/jlink/JLinkPluginsTest.java
index cd524db747a..f8d78475f8f 100644
--- a/test/jdk/tools/jlink/JLinkPluginsTest.java
+++ b/test/jdk/tools/jlink/JLinkPluginsTest.java
@@ -35,7 +35,6 @@
* @author Jean-Francois Denise
* @requires (vm.compMode != "Xcomp" & os.maxMemory >= 2g)
* @library ../lib
- * @enablePreview
* @modules java.base/jdk.internal.jimage
* jdk.jlink/jdk.tools.jlink.internal
* jdk.jlink/jdk.tools.jmod
diff --git a/test/jdk/tools/jlink/JLinkTest.java b/test/jdk/tools/jlink/JLinkTest.java
index e897badad13..63863812e2a 100644
--- a/test/jdk/tools/jlink/JLinkTest.java
+++ b/test/jdk/tools/jlink/JLinkTest.java
@@ -51,7 +51,6 @@
* @author Jean-Francois Denise
* @requires (vm.compMode != "Xcomp" & os.maxMemory >= 2g)
* @library ../lib
- * @enablePreview
* @modules java.base/jdk.internal.jimage
* jdk.jlink/jdk.tools.jlink.internal
* jdk.jlink/jdk.tools.jlink.plugin
diff --git a/test/jdk/tools/jlink/ModuleNamesOrderTest.java b/test/jdk/tools/jlink/ModuleNamesOrderTest.java
index d8fda1387d7..bd71fcce108 100644
--- a/test/jdk/tools/jlink/ModuleNamesOrderTest.java
+++ b/test/jdk/tools/jlink/ModuleNamesOrderTest.java
@@ -41,7 +41,6 @@
* @bug 8168925
* @summary MODULES property should be topologically ordered and space-separated list
* @library ../lib
- * @enablePreview
* @modules java.base/jdk.internal.jimage
* jdk.jlink/jdk.tools.jlink.internal
* jdk.jlink/jdk.tools.jmod
diff --git a/test/jdk/tools/jlink/NativeTest.java b/test/jdk/tools/jlink/NativeTest.java
index 8fba7b8f699..1c117476433 100644
--- a/test/jdk/tools/jlink/NativeTest.java
+++ b/test/jdk/tools/jlink/NativeTest.java
@@ -26,7 +26,6 @@
* @summary Test config, cmd and lib directories of jmod.
* @author Andrei Eremeev
* @library ../lib
- * @enablePreview
* @modules java.base/jdk.internal.jimage
* jdk.jlink/jdk.tools.jlink.internal
* jdk.jlink/jdk.tools.jmod
diff --git a/test/jdk/tools/jlink/plugins/AddOptionsPluginTest.java b/test/jdk/tools/jlink/plugins/AddOptionsPluginTest.java
index acb2e65fd38..a931662887f 100644
--- a/test/jdk/tools/jlink/plugins/AddOptionsPluginTest.java
+++ b/test/jdk/tools/jlink/plugins/AddOptionsPluginTest.java
@@ -30,7 +30,6 @@
* @summary Test the --add-options plugin
* @library ../../lib
* @library /test/lib
- * @enablePreview
* @modules java.base/jdk.internal.jimage
* jdk.jlink/jdk.tools.jlink.internal
* jdk.jlink/jdk.tools.jmod
diff --git a/test/jdk/tools/jlink/plugins/CDSPluginTest.java b/test/jdk/tools/jlink/plugins/CDSPluginTest.java
index c9766183297..46683625320 100644
--- a/test/jdk/tools/jlink/plugins/CDSPluginTest.java
+++ b/test/jdk/tools/jlink/plugins/CDSPluginTest.java
@@ -38,7 +38,6 @@
* @requires vm.cds
* @library ../../lib
* @library /test/lib
- * @enablePreview
* @modules java.base/jdk.internal.jimage
* jdk.jlink/jdk.tools.jlink.internal
* jdk.jlink/jdk.tools.jmod
diff --git a/test/jdk/tools/jlink/plugins/GenerateJLIClassesPluginTest.java b/test/jdk/tools/jlink/plugins/GenerateJLIClassesPluginTest.java
index 1acad93f5d3..998444b9a77 100644
--- a/test/jdk/tools/jlink/plugins/GenerateJLIClassesPluginTest.java
+++ b/test/jdk/tools/jlink/plugins/GenerateJLIClassesPluginTest.java
@@ -50,7 +50,6 @@
* @bug 8252919 8327499
* @library ../../lib
* @summary Test --generate-jli-classes plugin
- * @enablePreview
* @modules java.base/jdk.internal.jimage
* jdk.jlink/jdk.tools.jlink.internal
* jdk.jlink/jdk.tools.jlink.internal.plugins
diff --git a/test/jdk/tools/jlink/plugins/IncludeLocalesPluginTest.java b/test/jdk/tools/jlink/plugins/IncludeLocalesPluginTest.java
index e2dd3403c83..f0fe3149247 100644
--- a/test/jdk/tools/jlink/plugins/IncludeLocalesPluginTest.java
+++ b/test/jdk/tools/jlink/plugins/IncludeLocalesPluginTest.java
@@ -47,7 +47,6 @@
* @author Naoto Sato
* @requires (vm.compMode != "Xcomp" & os.maxMemory >= 2g)
* @library ../../lib
- * @enablePreview
* @modules java.base/jdk.internal.jimage
* jdk.jlink/jdk.tools.jlink.internal
* jdk.jlink/jdk.tools.jlink.internal.plugins
diff --git a/test/jdk/tools/jlink/plugins/SaveJlinkArgfilesPluginTest.java b/test/jdk/tools/jlink/plugins/SaveJlinkArgfilesPluginTest.java
index 207290d6cf7..40b30597192 100644
--- a/test/jdk/tools/jlink/plugins/SaveJlinkArgfilesPluginTest.java
+++ b/test/jdk/tools/jlink/plugins/SaveJlinkArgfilesPluginTest.java
@@ -27,7 +27,6 @@
* @requires vm.jvmci
* @library ../../lib
* @library /test/lib
- * @enablePreview
* @modules java.base/jdk.internal.jimage
* jdk.jlink/jdk.tools.jlink.internal
* jdk.jlink/jdk.tools.jmod
diff --git a/test/jdk/tools/jlink/plugins/StringSharingPluginTest.java b/test/jdk/tools/jlink/plugins/StringSharingPluginTest.java
index 3979c7e833b..d1c765c7c9d 100644
--- a/test/jdk/tools/jlink/plugins/StringSharingPluginTest.java
+++ b/test/jdk/tools/jlink/plugins/StringSharingPluginTest.java
@@ -26,7 +26,6 @@
* @summary Test StringSharingPluginTest
* @author Jean-Francois Denise
* @library ../../lib
- * @enablePreview
* @modules java.base/jdk.internal.jimage
* java.base/jdk.internal.jimage.decompressor
* jdk.jlink/jdk.tools.jlink.internal
diff --git a/test/jdk/tools/jlink/plugins/StripJavaDebugAttributesPluginTest.java b/test/jdk/tools/jlink/plugins/StripJavaDebugAttributesPluginTest.java
index 0bcb19e087c..da2670250bb 100644
--- a/test/jdk/tools/jlink/plugins/StripJavaDebugAttributesPluginTest.java
+++ b/test/jdk/tools/jlink/plugins/StripJavaDebugAttributesPluginTest.java
@@ -27,7 +27,6 @@
* @author Jean-Francois Denise
* @library ../../lib
* @build tests.*
- * @enablePreview
* @modules java.base/jdk.internal.jimage
* jdk.jlink/jdk.tools.jlink.internal
* jdk.jlink/jdk.tools.jlink.internal.plugins
diff --git a/test/jdk/tools/jlink/plugins/VendorInfoPluginsTest.java b/test/jdk/tools/jlink/plugins/VendorInfoPluginsTest.java
index 2f2c52a6c17..3cffac89186 100644
--- a/test/jdk/tools/jlink/plugins/VendorInfoPluginsTest.java
+++ b/test/jdk/tools/jlink/plugins/VendorInfoPluginsTest.java
@@ -30,7 +30,6 @@
* @summary Test the --vendor-version --vendor-url-bug plugins
* @library ../../lib
* @library /test/lib
- * @enablePreview
* @modules java.base/jdk.internal.jimage
* jdk.jlink/jdk.tools.jlink.internal
* jdk.jlink/jdk.tools.jmod
diff --git a/test/langtools/jdk/javadoc/tool/CheckResourceKeys.java b/test/langtools/jdk/javadoc/tool/CheckResourceKeys.java
index f188aa036f4..ee5014a310a 100644
--- a/test/langtools/jdk/javadoc/tool/CheckResourceKeys.java
+++ b/test/langtools/jdk/javadoc/tool/CheckResourceKeys.java
@@ -29,7 +29,6 @@
* jdk.javadoc/jdk.javadoc.internal.doclets.formats.html.resources:open
* jdk.javadoc/jdk.javadoc.internal.doclets.toolkit.resources:open
* jdk.javadoc/jdk.javadoc.internal.tool.resources:open
- * @enablePreview
*/
import java.io.*;
diff --git a/test/langtools/tools/javac/4241573/T4241573.java b/test/langtools/tools/javac/4241573/T4241573.java
index 9989ff83454..de832aef706 100644
--- a/test/langtools/tools/javac/4241573/T4241573.java
+++ b/test/langtools/tools/javac/4241573/T4241573.java
@@ -25,8 +25,6 @@
* @test
* @bug 4241573
* @summary SourceFile attribute includes full path
- * @enablePreview
- * @modules java.base/jdk.internal.classfile.impl
*/
import java.lang.classfile.*;
diff --git a/test/langtools/tools/javac/7003595/T7003595.java b/test/langtools/tools/javac/7003595/T7003595.java
index c5c12259c14..3aafbf74b6a 100644
--- a/test/langtools/tools/javac/7003595/T7003595.java
+++ b/test/langtools/tools/javac/7003595/T7003595.java
@@ -25,9 +25,7 @@
* @test
* @bug 7003595
* @summary IncompatibleClassChangeError with unreferenced local class with subclass
- * @enablePreview
- * @modules java.base/jdk.internal.classfile.impl
- * jdk.compiler/com.sun.tools.javac.api
+ * @modules jdk.compiler/com.sun.tools.javac.api
* jdk.compiler/com.sun.tools.javac.file
*/
diff --git a/test/langtools/tools/javac/7153958/CPoolRefClassContainingInlinedCts.java b/test/langtools/tools/javac/7153958/CPoolRefClassContainingInlinedCts.java
index cff6e774a2f..1fd3fb3fbcc 100644
--- a/test/langtools/tools/javac/7153958/CPoolRefClassContainingInlinedCts.java
+++ b/test/langtools/tools/javac/7153958/CPoolRefClassContainingInlinedCts.java
@@ -25,8 +25,6 @@
* @test
* @bug 7153958 8073372
* @summary add constant pool reference to class containing inlined constants
- * @enablePreview
- * @modules java.base/jdk.internal.classfile.impl
* @compile pkg/ClassToBeStaticallyImportedA.java pkg/ClassToBeStaticallyImportedB.java CPoolRefClassContainingInlinedCts.java
* @run main CPoolRefClassContainingInlinedCts
*/
diff --git a/test/langtools/tools/javac/7166455/CheckACC_STRICTFlagOnclinitTest.java b/test/langtools/tools/javac/7166455/CheckACC_STRICTFlagOnclinitTest.java
index 734b1741682..66cd9e91ff2 100644
--- a/test/langtools/tools/javac/7166455/CheckACC_STRICTFlagOnclinitTest.java
+++ b/test/langtools/tools/javac/7166455/CheckACC_STRICTFlagOnclinitTest.java
@@ -26,7 +26,6 @@
* @bug 7166455
* @summary javac doesn't set ACC_STRICT bit on for strictfp class
* @library /tools/lib /test/lib
- * @enablePreview
*/
import jdk.test.lib.compiler.CompilerUtils;
diff --git a/test/langtools/tools/javac/8000518/DuplicateConstantPoolEntry.java b/test/langtools/tools/javac/8000518/DuplicateConstantPoolEntry.java
index eee423e48a8..99ad19203b5 100644
--- a/test/langtools/tools/javac/8000518/DuplicateConstantPoolEntry.java
+++ b/test/langtools/tools/javac/8000518/DuplicateConstantPoolEntry.java
@@ -26,8 +26,6 @@
* @bug 8000518
* @summary Javac generates duplicate name_and_type constant pool entry for
* class BinaryOpValueExp.java
- * @enablePreview
- * @modules java.base/jdk.internal.classfile.impl
* @run main DuplicateConstantPoolEntry
*/
diff --git a/test/langtools/tools/javac/8005931/CheckACC_STRICTFlagOnPkgAccessClassTest.java b/test/langtools/tools/javac/8005931/CheckACC_STRICTFlagOnPkgAccessClassTest.java
index de8cdbc5af3..4ba8c7a6491 100644
--- a/test/langtools/tools/javac/8005931/CheckACC_STRICTFlagOnPkgAccessClassTest.java
+++ b/test/langtools/tools/javac/8005931/CheckACC_STRICTFlagOnPkgAccessClassTest.java
@@ -25,8 +25,6 @@
* @test
* @bug 8005931
* @summary javac doesn't set ACC_STRICT for classes with package access
- * @enablePreview
- * @modules java.base/jdk.internal.classfile.impl
* @run main CheckACC_STRICTFlagOnPkgAccessClassTest
*/
diff --git a/test/langtools/tools/javac/8009170/RedundantByteCodeInArrayTest.java b/test/langtools/tools/javac/8009170/RedundantByteCodeInArrayTest.java
index 8f2ed91039c..8b8eb23be4d 100644
--- a/test/langtools/tools/javac/8009170/RedundantByteCodeInArrayTest.java
+++ b/test/langtools/tools/javac/8009170/RedundantByteCodeInArrayTest.java
@@ -26,7 +26,6 @@
* @bug 8009170
* @summary Regression: javac generates redundant bytecode in assignop involving
* arrays
- * @enablePreview
* @run main RedundantByteCodeInArrayTest
*/
diff --git a/test/langtools/tools/javac/AnonymousClass/AnonymousClassFlags.java b/test/langtools/tools/javac/AnonymousClass/AnonymousClassFlags.java
index fb78132e4f1..e163a4350cd 100644
--- a/test/langtools/tools/javac/AnonymousClass/AnonymousClassFlags.java
+++ b/test/langtools/tools/javac/AnonymousClass/AnonymousClassFlags.java
@@ -25,8 +25,6 @@
* @test
* @bug 8161013
* @summary Verify that anonymous class binaries have the correct flags set
- * @enablePreview
- * @modules java.base/jdk.internal.classfile.impl
* @run main AnonymousClassFlags
*/
diff --git a/test/langtools/tools/javac/MethodParameters/AnnotationTest.java b/test/langtools/tools/javac/MethodParameters/AnnotationTest.java
index e30f83f8af3..c373de15e52 100644
--- a/test/langtools/tools/javac/MethodParameters/AnnotationTest.java
+++ b/test/langtools/tools/javac/MethodParameters/AnnotationTest.java
@@ -25,8 +25,6 @@
* @test
* @bug 8006582
* @summary javac should generate method parameters correctly.
- * @enablePreview
- * @modules java.base/jdk.internal.classfile.impl
* @build MethodParametersTester ClassFileVisitor ReflectionVisitor
* @compile -parameters AnnotationTest.java
* @run main MethodParametersTester AnnotationTest AnnotationTest.out
diff --git a/test/langtools/tools/javac/MethodParameters/AnonymousClass.java b/test/langtools/tools/javac/MethodParameters/AnonymousClass.java
index 3926d9623a3..d0bf322b0c6 100644
--- a/test/langtools/tools/javac/MethodParameters/AnonymousClass.java
+++ b/test/langtools/tools/javac/MethodParameters/AnonymousClass.java
@@ -25,8 +25,6 @@
* @test
* @bug 8006582
* @summary javac should generate method parameters correctly.
- * @enablePreview
- * @modules java.base/jdk.internal.classfile.impl
* @build MethodParametersTester ClassFileVisitor ReflectionVisitor
* @compile -parameters AnonymousClass.java
* @run main MethodParametersTester AnonymousClass AnonymousClass.out
diff --git a/test/langtools/tools/javac/MethodParameters/ClassFileVisitor.java b/test/langtools/tools/javac/MethodParameters/ClassFileVisitor.java
index 3e2d151808f..5a2f3dfd377 100644
--- a/test/langtools/tools/javac/MethodParameters/ClassFileVisitor.java
+++ b/test/langtools/tools/javac/MethodParameters/ClassFileVisitor.java
@@ -29,7 +29,7 @@
/**
* The {@code ClassFileVisitor} reads a class file using the
- * {@code jdk.internal.classfile} library. It iterates over the methods
+ * {@code java.lang.classfile} library. It iterates over the methods
* in a class, and checks MethodParameters attributes against JLS
* requirements, as well as assumptions about the javac implementations.
*
diff --git a/test/langtools/tools/javac/MethodParameters/Constructors.java b/test/langtools/tools/javac/MethodParameters/Constructors.java
index a797b40db5e..27c146ad049 100644
--- a/test/langtools/tools/javac/MethodParameters/Constructors.java
+++ b/test/langtools/tools/javac/MethodParameters/Constructors.java
@@ -25,8 +25,6 @@
* @test
* @bug 8006582
* @summary javac should generate method parameters correctly.
- * @enablePreview
- * @modules java.base/jdk.internal.classfile.impl
* @build MethodParametersTester ClassFileVisitor ReflectionVisitor
* @compile -parameters Constructors.java
* @run main MethodParametersTester Constructors Constructors.out
diff --git a/test/langtools/tools/javac/MethodParameters/EnumTest.java b/test/langtools/tools/javac/MethodParameters/EnumTest.java
index 0f706e7e02d..f7570644ecd 100644
--- a/test/langtools/tools/javac/MethodParameters/EnumTest.java
+++ b/test/langtools/tools/javac/MethodParameters/EnumTest.java
@@ -25,8 +25,6 @@
* @test
* @bug 8006582 8008658
* @summary javac should generate method parameters correctly.
- * @enablePreview
- * @modules java.base/jdk.internal.classfile.impl
* @build MethodParametersTester ClassFileVisitor ReflectionVisitor
* @compile -parameters EnumTest.java
* @run main MethodParametersTester EnumTest EnumTest.out
diff --git a/test/langtools/tools/javac/MethodParameters/InstanceMethods.java b/test/langtools/tools/javac/MethodParameters/InstanceMethods.java
index e84f12245c7..c3d45270c8e 100644
--- a/test/langtools/tools/javac/MethodParameters/InstanceMethods.java
+++ b/test/langtools/tools/javac/MethodParameters/InstanceMethods.java
@@ -25,8 +25,6 @@
* @test
* @bug 8006582
* @summary javac should generate method parameters correctly.
- * @enablePreview
- * @modules java.base/jdk.internal.classfile.impl
* @build MethodParametersTester ClassFileVisitor ReflectionVisitor
* @compile -parameters InstanceMethods.java
* @run main MethodParametersTester InstanceMethods InstanceMethods.out
diff --git a/test/langtools/tools/javac/MethodParameters/LambdaTest.java b/test/langtools/tools/javac/MethodParameters/LambdaTest.java
index 252c9487ce4..cad796a12fd 100644
--- a/test/langtools/tools/javac/MethodParameters/LambdaTest.java
+++ b/test/langtools/tools/javac/MethodParameters/LambdaTest.java
@@ -25,8 +25,6 @@
* @test
* @bug 8006582 8037546 8138729
* @summary javac should generate method parameters correctly.
- * @enablePreview
- * @modules java.base/jdk.internal.classfile.impl
* @build MethodParametersTester ClassFileVisitor ReflectionVisitor
* @compile -parameters LambdaTest.java
* @run main MethodParametersTester LambdaTest LambdaTest.out
diff --git a/test/langtools/tools/javac/MethodParameters/LegacyOutputTest/LegacyOutputTest.java b/test/langtools/tools/javac/MethodParameters/LegacyOutputTest/LegacyOutputTest.java
index dad79da509e..b2e0c6eac70 100644
--- a/test/langtools/tools/javac/MethodParameters/LegacyOutputTest/LegacyOutputTest.java
+++ b/test/langtools/tools/javac/MethodParameters/LegacyOutputTest/LegacyOutputTest.java
@@ -26,8 +26,6 @@
* @test
* @bug 8190452
* @summary javac should not add MethodParameters attributes to v51 and earlier class files
- * @enablePreview
- * @modules java.base/jdk.internal.classfile.impl
* @build LegacyOutputTest
* @run main LegacyOutputTest
*/
diff --git a/test/langtools/tools/javac/MethodParameters/LocalClassTest.java b/test/langtools/tools/javac/MethodParameters/LocalClassTest.java
index 061e2213a4c..554ed798316 100644
--- a/test/langtools/tools/javac/MethodParameters/LocalClassTest.java
+++ b/test/langtools/tools/javac/MethodParameters/LocalClassTest.java
@@ -25,8 +25,6 @@
* @test
* @bug 8006582 8008658
* @summary javac should generate method parameters correctly.
- * @enablePreview
- * @modules java.base/jdk.internal.classfile.impl
* @build MethodParametersTester ClassFileVisitor ReflectionVisitor
* @compile -parameters LocalClassTest.java
* @run main MethodParametersTester LocalClassTest LocalClassTest.out
diff --git a/test/langtools/tools/javac/MethodParameters/MemberClassTest.java b/test/langtools/tools/javac/MethodParameters/MemberClassTest.java
index 940d30da40c..b0ea9c9fbee 100644
--- a/test/langtools/tools/javac/MethodParameters/MemberClassTest.java
+++ b/test/langtools/tools/javac/MethodParameters/MemberClassTest.java
@@ -25,8 +25,6 @@
* @test
* @bug 8006582 8008658
* @summary javac should generate method parameters correctly.
- * @enablePreview
- * @modules java.base/jdk.internal.classfile.impl
* @build MethodParametersTester ClassFileVisitor ReflectionVisitor
* @compile -parameters MemberClassTest.java
* @run main MethodParametersTester MemberClassTest MemberClassTest.out
diff --git a/test/langtools/tools/javac/MethodParameters/StaticMethods.java b/test/langtools/tools/javac/MethodParameters/StaticMethods.java
index a6c0d8aa5d0..24cadb6ca36 100644
--- a/test/langtools/tools/javac/MethodParameters/StaticMethods.java
+++ b/test/langtools/tools/javac/MethodParameters/StaticMethods.java
@@ -25,8 +25,6 @@
* @test
* @bug 8006582
* @summary javac should generate method parameters correctly.
- * @enablePreview
- * @modules java.base/jdk.internal.classfile.impl
* @build MethodParametersTester ClassFileVisitor ReflectionVisitor
* @compile -parameters StaticMethods.java
* @run main MethodParametersTester StaticMethods StaticMethods.out
diff --git a/test/langtools/tools/javac/MethodParameters/UncommonParamNames.java b/test/langtools/tools/javac/MethodParameters/UncommonParamNames.java
index ae17d90150d..f531db7a09a 100644
--- a/test/langtools/tools/javac/MethodParameters/UncommonParamNames.java
+++ b/test/langtools/tools/javac/MethodParameters/UncommonParamNames.java
@@ -25,8 +25,6 @@
* @test
* @bug 8006582
* @summary javac should generate method parameters correctly.
- * @enablePreview
- * @modules java.base/jdk.internal.classfile.impl
* @build MethodParametersTester ClassFileVisitor ReflectionVisitor
* @compile -parameters UncommonParamNames.java
* @run main MethodParametersTester UncommonParamNames UncommonParamNames.out
diff --git a/test/langtools/tools/javac/MethodParametersTest.java b/test/langtools/tools/javac/MethodParametersTest.java
index a4d55525e60..8636d8bfc61 100644
--- a/test/langtools/tools/javac/MethodParametersTest.java
+++ b/test/langtools/tools/javac/MethodParametersTest.java
@@ -25,9 +25,7 @@
* @test
* @bug 8004727
* @summary javac should generate method parameters correctly.
- * @enablePreview
- * @modules java.base/jdk.internal.classfile.impl
- * jdk.compiler/com.sun.tools.javac.code
+ * @modules jdk.compiler/com.sun.tools.javac.code
* jdk.compiler/com.sun.tools.javac.comp
* jdk.compiler/com.sun.tools.javac.file
* jdk.compiler/com.sun.tools.javac.main
diff --git a/test/langtools/tools/javac/NoStringToLower.java b/test/langtools/tools/javac/NoStringToLower.java
index 64e68aad1de..ed787c759f4 100644
--- a/test/langtools/tools/javac/NoStringToLower.java
+++ b/test/langtools/tools/javac/NoStringToLower.java
@@ -25,8 +25,6 @@
* @test
* @bug 8029800
* @summary String.toLowerCase()/toUpperCase is generally dangerous, check it is not used in langtools
- * @enablePreview
- * @modules java.base/jdk.internal.classfile.impl
*/
import java.io.*;
@@ -63,6 +61,7 @@ boolean run(String... args) throws Exception {
"javax.lang.model",
"javax.tools",
"com.sun.source",
+ "java.lang.classfile",
"jdk.internal.classfile",
"com.sun.tools.doclint",
"com.sun.tools.javac",
diff --git a/test/langtools/tools/javac/RequiredParameterFlags/ImplicitParameters.java b/test/langtools/tools/javac/RequiredParameterFlags/ImplicitParameters.java
index 0eb4d1b8a42..b53238ce4e5 100644
--- a/test/langtools/tools/javac/RequiredParameterFlags/ImplicitParameters.java
+++ b/test/langtools/tools/javac/RequiredParameterFlags/ImplicitParameters.java
@@ -26,11 +26,9 @@
* @bug 8292275
* @summary check that implicit parameter flags are available by default
* @library /tools/lib
- * @enablePreview
* @modules jdk.compiler/com.sun.tools.javac.api
* jdk.compiler/com.sun.tools.javac.main
* jdk.compiler/com.sun.tools.javac.code
- * java.base/jdk.internal.classfile.impl
* @run main ImplicitParameters
*/
diff --git a/test/langtools/tools/javac/StringConcat/TestIndyStringConcat.java b/test/langtools/tools/javac/StringConcat/TestIndyStringConcat.java
index 8ec49a17c4d..f4fed6fe68b 100644
--- a/test/langtools/tools/javac/StringConcat/TestIndyStringConcat.java
+++ b/test/langtools/tools/javac/StringConcat/TestIndyStringConcat.java
@@ -39,7 +39,6 @@
* @bug 8148483 8151516 8151223
* @summary Test that StringConcat is working for JDK >= 9
* @library /tools/lib /test/lib
- * @enablePreview
* @run main TestIndyStringConcat
*/
public class TestIndyStringConcat {
diff --git a/test/langtools/tools/javac/StringConcat/WellKnownTypeSignatures.java b/test/langtools/tools/javac/StringConcat/WellKnownTypeSignatures.java
index 174e9721f3f..2d3d25dde5e 100644
--- a/test/langtools/tools/javac/StringConcat/WellKnownTypeSignatures.java
+++ b/test/langtools/tools/javac/StringConcat/WellKnownTypeSignatures.java
@@ -34,8 +34,6 @@
* @test
* @bug 8273914
* @summary Indy string concat changes order of operations
- * @enablePreview
- * @modules java.base/jdk.internal.classfile.impl
*
* @clean *
* @compile -XDstringConcat=indy WellKnownTypeSignatures.java
diff --git a/test/langtools/tools/javac/StringConcat/WellKnownTypes.java b/test/langtools/tools/javac/StringConcat/WellKnownTypes.java
index 470182bc04e..8c20117a756 100644
--- a/test/langtools/tools/javac/StringConcat/WellKnownTypes.java
+++ b/test/langtools/tools/javac/StringConcat/WellKnownTypes.java
@@ -25,7 +25,6 @@
* @test
* @bug 8273914
* @summary Indy string concat changes order of operations
- * @enablePreview
*
* @compile -XDstringConcat=indy WellKnownTypes.java
* @run main WellKnownTypes
diff --git a/test/langtools/tools/javac/StringConcat/access/Test.java b/test/langtools/tools/javac/StringConcat/access/Test.java
index c4aa54618ea..d9d7332e876 100644
--- a/test/langtools/tools/javac/StringConcat/access/Test.java
+++ b/test/langtools/tools/javac/StringConcat/access/Test.java
@@ -34,7 +34,6 @@
* @test
* @bug 8151223
* @summary String concatenation fails with implicit toString() on package-private class
- * @enablePreview
*
* @clean *
* @compile -XDstringConcat=indy Holder.java PublicClass.java PublicInterface.java Public_PublicClass.java Public_PublicInterface.java Public_PrivateInterface1.java Public_PrivateInterface2.java Test.java
diff --git a/test/langtools/tools/javac/T6695379/AnnotationsAreNotCopiedToBridgeMethodsTest.java b/test/langtools/tools/javac/T6695379/AnnotationsAreNotCopiedToBridgeMethodsTest.java
index bb486b32382..b842f1a54ff 100644
--- a/test/langtools/tools/javac/T6695379/AnnotationsAreNotCopiedToBridgeMethodsTest.java
+++ b/test/langtools/tools/javac/T6695379/AnnotationsAreNotCopiedToBridgeMethodsTest.java
@@ -26,9 +26,7 @@
* @bug 6695379
* @summary Copy method annotations and parameter annotations to synthetic
* bridge methods
- * @enablePreview
- * @modules java.base/jdk.internal.classfile.impl
- * jdk.compiler/com.sun.tools.javac.util
+ * @modules jdk.compiler/com.sun.tools.javac.util
* @run main AnnotationsAreNotCopiedToBridgeMethodsTest
*/
diff --git a/test/langtools/tools/javac/T6970173/DebugPointerAtBadPositionTest.java b/test/langtools/tools/javac/T6970173/DebugPointerAtBadPositionTest.java
index 56813905ca5..070d45d2be3 100644
--- a/test/langtools/tools/javac/T6970173/DebugPointerAtBadPositionTest.java
+++ b/test/langtools/tools/javac/T6970173/DebugPointerAtBadPositionTest.java
@@ -26,9 +26,7 @@
* @bug 6970173
* @summary Debug pointer at bad position
* @library /tools/lib
- * @enablePreview
- * @modules java.base/jdk.internal.classfile.impl
- * jdk.compiler/com.sun.tools.javac.api
+ * @modules jdk.compiler/com.sun.tools.javac.api
* jdk.compiler/com.sun.tools.javac.main
* jdk.compiler/com.sun.tools.javac.util
* jdk.jdeps/com.sun.tools.javap
diff --git a/test/langtools/tools/javac/T7008643/InlinedFinallyConfuseDebuggersTest.java b/test/langtools/tools/javac/T7008643/InlinedFinallyConfuseDebuggersTest.java
index 839c835c800..62bae68ad36 100644
--- a/test/langtools/tools/javac/T7008643/InlinedFinallyConfuseDebuggersTest.java
+++ b/test/langtools/tools/javac/T7008643/InlinedFinallyConfuseDebuggersTest.java
@@ -26,9 +26,7 @@
* @bug 7008643
* @summary inlined finally clauses confuse debuggers
* @library /tools/lib
- * @enablePreview
- * @modules java.base/jdk.internal.classfile.impl
- * jdk.compiler/com.sun.tools.javac.api
+ * @modules jdk.compiler/com.sun.tools.javac.api
* jdk.compiler/com.sun.tools.javac.main
* jdk.compiler/com.sun.tools.javac.util
* jdk.jdeps/com.sun.tools.javap
diff --git a/test/langtools/tools/javac/T7053059/DoubleCastTest.java b/test/langtools/tools/javac/T7053059/DoubleCastTest.java
index 2aaf5d40f39..4353a119ec7 100644
--- a/test/langtools/tools/javac/T7053059/DoubleCastTest.java
+++ b/test/langtools/tools/javac/T7053059/DoubleCastTest.java
@@ -25,9 +25,7 @@
* @test
* @bug 8015499
* @summary javac, Gen is generating extra checkcast instructions in some corner cases
- * @enablePreview
- * @modules java.base/jdk.internal.classfile.impl
- * jdk.compiler/com.sun.tools.javac.util
+ * @modules jdk.compiler/com.sun.tools.javac.util
* @run main DoubleCastTest
*/
diff --git a/test/langtools/tools/javac/T7093325.java b/test/langtools/tools/javac/T7093325.java
index 0a8fac0692b..0b527794c1a 100644
--- a/test/langtools/tools/javac/T7093325.java
+++ b/test/langtools/tools/javac/T7093325.java
@@ -27,9 +27,7 @@
* @summary Redundant entry in bytecode exception table
* temporarily workaround combo tests are causing time out in several platforms
* @library /tools/javac/lib
- * @enablePreview
- * @modules java.base/jdk.internal.classfile.impl
- * jdk.compiler/com.sun.tools.javac.api
+ * @modules jdk.compiler/com.sun.tools.javac.api
* jdk.compiler/com.sun.tools.javac.file
* jdk.compiler/com.sun.tools.javac.util
* @build combo.ComboTestHelper
diff --git a/test/langtools/tools/javac/T7165659/InnerClassAttrMustNotHaveStrictFPFlagTest.java b/test/langtools/tools/javac/T7165659/InnerClassAttrMustNotHaveStrictFPFlagTest.java
index d7b823d94ec..493dbab113d 100644
--- a/test/langtools/tools/javac/T7165659/InnerClassAttrMustNotHaveStrictFPFlagTest.java
+++ b/test/langtools/tools/javac/T7165659/InnerClassAttrMustNotHaveStrictFPFlagTest.java
@@ -25,7 +25,6 @@
* @test
* @bug 7165659
* @summary javac incorrectly sets strictfp access flag on inner-classes
- * @enablePreview
* @modules jdk.compiler/com.sun.tools.javac.util
*/
diff --git a/test/langtools/tools/javac/T8003967/DetectMutableStaticFields.java b/test/langtools/tools/javac/T8003967/DetectMutableStaticFields.java
index 2f10e510b0c..ee170ec939e 100644
--- a/test/langtools/tools/javac/T8003967/DetectMutableStaticFields.java
+++ b/test/langtools/tools/javac/T8003967/DetectMutableStaticFields.java
@@ -25,9 +25,7 @@
* @test
* @bug 8003967
* @summary detect and remove all mutable implicit static enum fields in langtools
- * @enablePreview
- * @modules java.base/jdk.internal.classfile.impl
- * jdk.compiler/com.sun.tools.javac.util
+ * @modules jdk.compiler/com.sun.tools.javac.util
* @run main DetectMutableStaticFields
*/
@@ -69,11 +67,11 @@ public class DetectMutableStaticFields {
"javax.tools",
"javax.lang.model",
"com.sun.source",
- "jdk.internal.classfile",
- "jdk.internal.classfile.attribute",
- "jdk.internal.classfile.constantpool",
- "jdk.internal.classfile.instruction",
- "jdk.internal.classfile.components",
+ "java.lang.classfile",
+ "java.lang.classfile.attribute",
+ "java.lang.classfile.constantpool",
+ "java.lang.classfile.instruction",
+ "java.lang.classfile.components",
"jdk.internal.classfile.impl",
"com.sun.tools.javac",
"com.sun.tools.javah",
diff --git a/test/langtools/tools/javac/T8010737/ParameterNamesAreNotCopiedToAnonymousInitTest.java b/test/langtools/tools/javac/T8010737/ParameterNamesAreNotCopiedToAnonymousInitTest.java
index 81879a5f2a0..a72c768aaef 100644
--- a/test/langtools/tools/javac/T8010737/ParameterNamesAreNotCopiedToAnonymousInitTest.java
+++ b/test/langtools/tools/javac/T8010737/ParameterNamesAreNotCopiedToAnonymousInitTest.java
@@ -26,9 +26,7 @@
* @bug 8010737
* @summary javac, known parameter's names should be copied to automatically
* generated constructors for inner classes
- * @enablePreview
- * @modules java.base/jdk.internal.classfile.impl
- * jdk.compiler/com.sun.tools.javac.api
+ * @modules jdk.compiler/com.sun.tools.javac.api
* jdk.compiler/com.sun.tools.javac.code
* jdk.compiler/com.sun.tools.javac.tree
* jdk.compiler/com.sun.tools.javac.util
@@ -143,9 +141,6 @@ void checkInitSymbol(
Arrays.asList(new File(System.getProperty("test.src"),
this.getClass().getName() + ".java")));
java.util.List options = Arrays.asList(
- "--enable-preview",
- "--source", String.valueOf(Runtime.version().feature()),
- "--add-exports", "java.base/jdk.internal.classfile.impl=ALL-UNNAMED",
"--add-exports", "jdk.compiler/com.sun.tools.javac.api=ALL-UNNAMED",
"--add-exports", "jdk.compiler/com.sun.tools.javac.code=ALL-UNNAMED",
"--add-exports", "jdk.compiler/com.sun.tools.javac.tree=ALL-UNNAMED",
diff --git a/test/langtools/tools/javac/T8011181/EmptyUTF8ForInnerClassNameTest.java b/test/langtools/tools/javac/T8011181/EmptyUTF8ForInnerClassNameTest.java
index 2957bdd20e7..4f32bc090c3 100644
--- a/test/langtools/tools/javac/T8011181/EmptyUTF8ForInnerClassNameTest.java
+++ b/test/langtools/tools/javac/T8011181/EmptyUTF8ForInnerClassNameTest.java
@@ -25,7 +25,6 @@
* @test
* @bug 8011181
* @summary javac, empty UTF8 entry generated for inner class
- * @enablePreview
* @modules jdk.compiler/com.sun.tools.javac.util
*/
diff --git a/test/langtools/tools/javac/T8019486/WrongLNTForLambdaTest.java b/test/langtools/tools/javac/T8019486/WrongLNTForLambdaTest.java
index 4ddc40fa231..c916089f4ed 100644
--- a/test/langtools/tools/javac/T8019486/WrongLNTForLambdaTest.java
+++ b/test/langtools/tools/javac/T8019486/WrongLNTForLambdaTest.java
@@ -26,11 +26,9 @@
* @bug 8019486 8026861 8027142
* @summary javac, generates erroneous LVT for a test case with lambda code
* @library /tools/lib
- * @enablePreview
* @modules jdk.compiler/com.sun.tools.javac.api
* jdk.compiler/com.sun.tools.javac.main
* jdk.compiler/com.sun.tools.javac.util
- * java.base/jdk.internal.classfile.impl
* @build toolbox.ToolBox toolbox.JavacTask
* @run main WrongLNTForLambdaTest
*/
diff --git a/test/langtools/tools/javac/T8022186/DeadCodeGeneratedForEmptyTryTest.java b/test/langtools/tools/javac/T8022186/DeadCodeGeneratedForEmptyTryTest.java
index 8dd87820423..1870cc4cfa1 100644
--- a/test/langtools/tools/javac/T8022186/DeadCodeGeneratedForEmptyTryTest.java
+++ b/test/langtools/tools/javac/T8022186/DeadCodeGeneratedForEmptyTryTest.java
@@ -25,9 +25,7 @@
* @test
* @bug 8022186 8271254
* @summary javac generates dead code if a try with an empty body has a finalizer
- * @enablePreview
- * @modules java.base/jdk.internal.classfile.impl
- * jdk.compiler/com.sun.tools.javac.util
+ * @modules jdk.compiler/com.sun.tools.javac.util
*/
import java.lang.classfile.*;
diff --git a/test/langtools/tools/javac/T8024039/NoDeadCodeGenerationOnTrySmtTest.java b/test/langtools/tools/javac/T8024039/NoDeadCodeGenerationOnTrySmtTest.java
index 36afea59094..df6c32dcd48 100644
--- a/test/langtools/tools/javac/T8024039/NoDeadCodeGenerationOnTrySmtTest.java
+++ b/test/langtools/tools/javac/T8024039/NoDeadCodeGenerationOnTrySmtTest.java
@@ -26,11 +26,9 @@
* @bug 8024039
* @summary javac, previous solution for JDK-8022186 was incorrect
* @library /tools/lib
- * @enablePreview
* @modules jdk.compiler/com.sun.tools.javac.api
* jdk.compiler/com.sun.tools.javac.main
* jdk.compiler/com.sun.tools.javac.util
- * java.base/jdk.internal.classfile.impl
* @build toolbox.ToolBox toolbox.JavacTask
* @run main NoDeadCodeGenerationOnTrySmtTest
*/
diff --git a/test/langtools/tools/javac/T8028504/DontGenerateLVTForGNoneOpTest.java b/test/langtools/tools/javac/T8028504/DontGenerateLVTForGNoneOpTest.java
index 150b0fc8c7c..759b78cb929 100644
--- a/test/langtools/tools/javac/T8028504/DontGenerateLVTForGNoneOpTest.java
+++ b/test/langtools/tools/javac/T8028504/DontGenerateLVTForGNoneOpTest.java
@@ -25,7 +25,6 @@
* @test
* @bug 8028504
* @summary javac generates LocalVariableTable even with -g:none
- * @enablePreview
* @compile -g:none DontGenerateLVTForGNoneOpTest.java
* @run main DontGenerateLVTForGNoneOpTest
*/
diff --git a/test/langtools/tools/javac/T8180141/MissingLNTEntryForBreakContinueTest.java b/test/langtools/tools/javac/T8180141/MissingLNTEntryForBreakContinueTest.java
index 1a095ab5301..ad33759899f 100644
--- a/test/langtools/tools/javac/T8180141/MissingLNTEntryForBreakContinueTest.java
+++ b/test/langtools/tools/javac/T8180141/MissingLNTEntryForBreakContinueTest.java
@@ -25,9 +25,7 @@
* @test
* @bug 8180141
* @summary Missing entry in LineNumberTable for break statement that jumps out of try-finally
- * @enablePreview
- * @modules java.base/jdk.internal.classfile.impl
- * jdk.compiler/com.sun.tools.javac.code
+ * @modules jdk.compiler/com.sun.tools.javac.code
* jdk.compiler/com.sun.tools.javac.comp
* jdk.compiler/com.sun.tools.javac.file
* jdk.compiler/com.sun.tools.javac.main
diff --git a/test/langtools/tools/javac/T8180660/MissingLNTEntryForFinalizerTest.java b/test/langtools/tools/javac/T8180660/MissingLNTEntryForFinalizerTest.java
index 1cd9ee211e0..1da6fa5e121 100644
--- a/test/langtools/tools/javac/T8180660/MissingLNTEntryForFinalizerTest.java
+++ b/test/langtools/tools/javac/T8180660/MissingLNTEntryForFinalizerTest.java
@@ -25,9 +25,7 @@
* @test
* @bug 8180141
* @summary Missing entry in LineNumberTable for break statement that jumps out of try-finally
- * @enablePreview
- * @modules java.base/jdk.internal.classfile.impl
- * jdk.compiler/com.sun.tools.javac.code
+ * @modules jdk.compiler/com.sun.tools.javac.code
* jdk.compiler/com.sun.tools.javac.comp
* jdk.compiler/com.sun.tools.javac.file
* jdk.compiler/com.sun.tools.javac.main
diff --git a/test/langtools/tools/javac/T8187805/BogusRTTAForUnusedVarTest.java b/test/langtools/tools/javac/T8187805/BogusRTTAForUnusedVarTest.java
index aebc8a570d5..bf20746c738 100644
--- a/test/langtools/tools/javac/T8187805/BogusRTTAForUnusedVarTest.java
+++ b/test/langtools/tools/javac/T8187805/BogusRTTAForUnusedVarTest.java
@@ -24,9 +24,7 @@
/*
* @test 8187805
* @summary bogus RuntimeVisibleTypeAnnotations for unused local in a block
- * @enablePreview
- * @modules java.base/jdk.internal.classfile.impl
- * jdk.compiler/com.sun.tools.javac.util
+ * @modules jdk.compiler/com.sun.tools.javac.util
* @run main BogusRTTAForUnusedVarTest
*/
diff --git a/test/langtools/tools/javac/T8203892/CheckTargetIsNotAddedAsMarkerInterfaceTest.java b/test/langtools/tools/javac/T8203892/CheckTargetIsNotAddedAsMarkerInterfaceTest.java
index f123399c8f5..44e6564e49f 100644
--- a/test/langtools/tools/javac/T8203892/CheckTargetIsNotAddedAsMarkerInterfaceTest.java
+++ b/test/langtools/tools/javac/T8203892/CheckTargetIsNotAddedAsMarkerInterfaceTest.java
@@ -25,9 +25,7 @@
* @test 8203892
* @summary Target interface added as marker interface in calls to altMetafactory
* @library /tools/lib
- * @enablePreview
- * @modules java.base/jdk.internal.classfile.impl
- * jdk.compiler/com.sun.tools.javac.api
+ * @modules jdk.compiler/com.sun.tools.javac.api
* jdk.compiler/com.sun.tools.javac.main
* jdk.compiler/com.sun.tools.javac.util
* jdk.jdeps/com.sun.tools.javap
diff --git a/test/langtools/tools/javac/T8209173/CodeCompletionExceptTest.java b/test/langtools/tools/javac/T8209173/CodeCompletionExceptTest.java
index e18761fe5d1..e506340ab0a 100644
--- a/test/langtools/tools/javac/T8209173/CodeCompletionExceptTest.java
+++ b/test/langtools/tools/javac/T8209173/CodeCompletionExceptTest.java
@@ -26,9 +26,7 @@
* @bug 8209173
* @summary javac fails with completion exception while reporting an error
* @library /tools/lib
- * @enablePreview
- * @modules java.base/jdk.internal.classfile.impl
- * jdk.compiler/com.sun.tools.javac.api
+ * @modules jdk.compiler/com.sun.tools.javac.api
* jdk.compiler/com.sun.tools.javac.main
* jdk.compiler/com.sun.tools.javac.util
* jdk.jdeps/com.sun.tools.javap
diff --git a/test/langtools/tools/javac/T8210435/NoLocalsMustBeReservedForDCEedVarsTest.java b/test/langtools/tools/javac/T8210435/NoLocalsMustBeReservedForDCEedVarsTest.java
index 35ccb627b44..225b105664e 100644
--- a/test/langtools/tools/javac/T8210435/NoLocalsMustBeReservedForDCEedVarsTest.java
+++ b/test/langtools/tools/javac/T8210435/NoLocalsMustBeReservedForDCEedVarsTest.java
@@ -25,7 +25,6 @@
* @test
* @summary
* @library /tools/lib
- * @enablePreview
* @modules jdk.compiler/com.sun.tools.javac.api
* jdk.compiler/com.sun.tools.javac.main
* jdk.compiler/com.sun.tools.javac.util
diff --git a/test/langtools/tools/javac/T8222949/TestConstantDynamic.java b/test/langtools/tools/javac/T8222949/TestConstantDynamic.java
index d6f728eda5a..007e7648d40 100644
--- a/test/langtools/tools/javac/T8222949/TestConstantDynamic.java
+++ b/test/langtools/tools/javac/T8222949/TestConstantDynamic.java
@@ -26,9 +26,7 @@
* @bug 8222949
* @summary add condy support to javac's pool API
* @library /tools/javac/lib
- * @enablePreview
- * @modules java.base/jdk.internal.classfile.impl
- * jdk.compiler/com.sun.tools.javac.api
+ * @modules jdk.compiler/com.sun.tools.javac.api
* jdk.compiler/com.sun.tools.javac.code
* jdk.compiler/com.sun.tools.javac.file
* jdk.compiler/com.sun.tools.javac.jvm
diff --git a/test/langtools/tools/javac/TryWithResources/TwrSimpleClose.java b/test/langtools/tools/javac/TryWithResources/TwrSimpleClose.java
index 4c1e3a48275..1f2230493e4 100644
--- a/test/langtools/tools/javac/TryWithResources/TwrSimpleClose.java
+++ b/test/langtools/tools/javac/TryWithResources/TwrSimpleClose.java
@@ -26,8 +26,6 @@
* @bug 8194978
* @summary Verify than an appropriate number of close method invocations is generated.
* @library /tools/lib
- * @enablePreview
- * @modules java.base/jdk.internal.classfile.impl
* @build toolbox.ToolBox TwrSimpleClose
* @run main TwrSimpleClose
*/
diff --git a/test/langtools/tools/javac/annotations/ApplicableAnnotationsOnRecords.java b/test/langtools/tools/javac/annotations/ApplicableAnnotationsOnRecords.java
index 0bc65af8aa1..75e8d57fdad 100644
--- a/test/langtools/tools/javac/annotations/ApplicableAnnotationsOnRecords.java
+++ b/test/langtools/tools/javac/annotations/ApplicableAnnotationsOnRecords.java
@@ -26,9 +26,7 @@
* @summary test for com.sun.tools.javac.comp.Check::validateAnnotation, com.sun.tools.javac.code.SymbolMetadata::removeDeclarationMetadata and ::removeFromCompoundList
* @bug 8241312 8246774
* @library /tools/lib
- * @enablePreview
* @modules jdk.compiler/com.sun.tools.javac.util
- * java.base/jdk.internal.classfile.impl
* @run main ApplicableAnnotationsOnRecords
*/
import java.lang.classfile.*;
diff --git a/test/langtools/tools/javac/annotations/SyntheticParameters.java b/test/langtools/tools/javac/annotations/SyntheticParameters.java
index b26232c4989..692499a0b8a 100644
--- a/test/langtools/tools/javac/annotations/SyntheticParameters.java
+++ b/test/langtools/tools/javac/annotations/SyntheticParameters.java
@@ -26,8 +26,6 @@
* @bug 8065132
* @summary Test generation of annotations on inner class parameters.
* @library /lib/annotations/
- * @enablePreview
- * @modules java.base/jdk.internal.classfile.impl
* @build annotations.classfile.ClassfileInspector SyntheticParameters
* @run main SyntheticParameters
*/
diff --git a/test/langtools/tools/javac/annotations/parameter/ParameterAnnotations.java b/test/langtools/tools/javac/annotations/parameter/ParameterAnnotations.java
index 395765fcb80..da042001356 100644
--- a/test/langtools/tools/javac/annotations/parameter/ParameterAnnotations.java
+++ b/test/langtools/tools/javac/annotations/parameter/ParameterAnnotations.java
@@ -21,11 +21,10 @@
* questions.
*/
-/**
+/*
* @test
* @bug 8024694 8334870
* @summary Check javac can handle various Runtime(In)VisibleParameterAnnotations attribute combinations
- * @enablePreview
* @library /tools/lib
* @modules jdk.compiler/com.sun.tools.javac.api
* jdk.compiler/com.sun.tools.javac.main
@@ -641,8 +640,8 @@ private void doTest(Path base, String code, String binaryNameToCheck,
}
Task.Result result = new JavacTask(tb)
+ .processors(new TestAP())
.options("-classpath", classes.toString(),
- "-processor", TestAP.class.getName(),
"-XDrawDiagnostics",
"-Xlint:classfile")
.outdir(classes)
diff --git a/test/langtools/tools/javac/annotations/typeAnnotations/TypeAnnotationsPositionsOnRecords.java b/test/langtools/tools/javac/annotations/typeAnnotations/TypeAnnotationsPositionsOnRecords.java
index 6d2aabaee80..190c6372ebc 100644
--- a/test/langtools/tools/javac/annotations/typeAnnotations/TypeAnnotationsPositionsOnRecords.java
+++ b/test/langtools/tools/javac/annotations/typeAnnotations/TypeAnnotationsPositionsOnRecords.java
@@ -26,9 +26,7 @@
* @bug 8246774
* @summary Verify location of type annotations on records
* @library /tools/lib
- * @enablePreview
* @modules
- * java.base/jdk.internal.classfile.impl
* jdk.compiler/com.sun.tools.javac.api
* jdk.compiler/com.sun.tools.javac.main
* jdk.compiler/com.sun.tools.javac.code
diff --git a/test/langtools/tools/javac/annotations/typeAnnotations/VariablesDeclaredWithVarTest.java b/test/langtools/tools/javac/annotations/typeAnnotations/VariablesDeclaredWithVarTest.java
index 7384f4bd5d7..199e56fbf53 100644
--- a/test/langtools/tools/javac/annotations/typeAnnotations/VariablesDeclaredWithVarTest.java
+++ b/test/langtools/tools/javac/annotations/typeAnnotations/VariablesDeclaredWithVarTest.java
@@ -26,9 +26,7 @@
* @bug 8261205
* @summary check that potentially applicable type annotations are skip if the variable or parameter was declared with var
* @library /tools/lib
- * @enablePreview
* @modules
- * java.base/jdk.internal.classfile.impl
* jdk.compiler/com.sun.tools.javac.api
* jdk.compiler/com.sun.tools.javac.main
* jdk.compiler/com.sun.tools.javac.code
diff --git a/test/langtools/tools/javac/annotations/typeAnnotations/classfile/AnonymousClassTest.java b/test/langtools/tools/javac/annotations/typeAnnotations/classfile/AnonymousClassTest.java
index eb4b5aa2cf7..7a11e5239d1 100644
--- a/test/langtools/tools/javac/annotations/typeAnnotations/classfile/AnonymousClassTest.java
+++ b/test/langtools/tools/javac/annotations/typeAnnotations/classfile/AnonymousClassTest.java
@@ -26,10 +26,8 @@
* @bug 8198945 8207018 8207017
* @summary Invalid RuntimeVisibleTypeAnnotations for annotation on anonymous class type parameter
* @library /tools/lib
- * @enablePreview
* @modules jdk.compiler/com.sun.tools.javac.api
* jdk.compiler/com.sun.tools.javac.main
- * java.base/jdk.internal.classfile.impl
* jdk.jdeps/com.sun.tools.javap
* @build toolbox.ToolBox toolbox.JavapTask
* @run compile -g AnonymousClassTest.java
diff --git a/test/langtools/tools/javac/annotations/typeAnnotations/classfile/CombinationsTargetTest1.java b/test/langtools/tools/javac/annotations/typeAnnotations/classfile/CombinationsTargetTest1.java
index dfe116580b5..7d3f42584ad 100644
--- a/test/langtools/tools/javac/annotations/typeAnnotations/classfile/CombinationsTargetTest1.java
+++ b/test/langtools/tools/javac/annotations/typeAnnotations/classfile/CombinationsTargetTest1.java
@@ -25,8 +25,6 @@
* @test
* @bug 8005085 8005877 8004829 8005681 8006734 8006775
* @summary Combinations of Target ElementTypes on (repeated)type annotations.
- * @enablePreview
- * @modules java.base/jdk.internal.classfile.impl
*/
import java.lang.classfile.*;
diff --git a/test/langtools/tools/javac/annotations/typeAnnotations/classfile/CombinationsTargetTest2.java b/test/langtools/tools/javac/annotations/typeAnnotations/classfile/CombinationsTargetTest2.java
index 46f5717103a..dda964c3473 100644
--- a/test/langtools/tools/javac/annotations/typeAnnotations/classfile/CombinationsTargetTest2.java
+++ b/test/langtools/tools/javac/annotations/typeAnnotations/classfile/CombinationsTargetTest2.java
@@ -25,8 +25,6 @@
* @test
* @bug 8005085 8005877 8004829 8005681 8006734 8006775 8006507
* @summary Combinations of Target ElementTypes on (repeated)type annotations.
- * @enablePreview
- * @modules java.base/jdk.internal.classfile.impl
*/
import java.lang.classfile.*;
diff --git a/test/langtools/tools/javac/annotations/typeAnnotations/classfile/CombinationsTargetTest3.java b/test/langtools/tools/javac/annotations/typeAnnotations/classfile/CombinationsTargetTest3.java
index d0a4deef80b..16e2ed0bb5c 100644
--- a/test/langtools/tools/javac/annotations/typeAnnotations/classfile/CombinationsTargetTest3.java
+++ b/test/langtools/tools/javac/annotations/typeAnnotations/classfile/CombinationsTargetTest3.java
@@ -25,9 +25,7 @@
* @test
* @bug 8005085 8005681 8008769 8010015
* @summary Check (repeating)type annotations on lambda usage.
- * @enablePreview
* @modules jdk.jdeps/com.sun.tools.classfile
- * java.base/jdk.internal.classfile.impl
* @run main CombinationsTargetTest3
*/
diff --git a/test/langtools/tools/javac/annotations/typeAnnotations/classfile/DeadCode.java b/test/langtools/tools/javac/annotations/typeAnnotations/classfile/DeadCode.java
index 02caa8df615..3a9fdc9270a 100644
--- a/test/langtools/tools/javac/annotations/typeAnnotations/classfile/DeadCode.java
+++ b/test/langtools/tools/javac/annotations/typeAnnotations/classfile/DeadCode.java
@@ -32,8 +32,6 @@
* @test
* @bug 6917130 8006775
* @summary test that optimized away annotations are not emited to classfile
- * @enablePreview
- * @modules java.base/jdk.internal.classfile.impl
*/
public class DeadCode extends ClassfileTestHelper {
diff --git a/test/langtools/tools/javac/annotations/typeAnnotations/classfile/InstanceInitializer.java b/test/langtools/tools/javac/annotations/typeAnnotations/classfile/InstanceInitializer.java
index be3ca03c30c..d6a775c2b6c 100644
--- a/test/langtools/tools/javac/annotations/typeAnnotations/classfile/InstanceInitializer.java
+++ b/test/langtools/tools/javac/annotations/typeAnnotations/classfile/InstanceInitializer.java
@@ -29,8 +29,6 @@
* @test
* @bug 8136419 8200301
* @summary test that type annotations on entities in initializers are emitted to classfile
- * @enablePreview
- * @modules java.base/jdk.internal.classfile.impl
* @compile -XDdeduplicateLambdas=false InstanceInitializer.java
* @run main InstanceInitializer
*/
diff --git a/test/langtools/tools/javac/annotations/typeAnnotations/classfile/NewTypeArguments.java b/test/langtools/tools/javac/annotations/typeAnnotations/classfile/NewTypeArguments.java
index f447dde8998..cbaebb4916e 100644
--- a/test/langtools/tools/javac/annotations/typeAnnotations/classfile/NewTypeArguments.java
+++ b/test/langtools/tools/javac/annotations/typeAnnotations/classfile/NewTypeArguments.java
@@ -31,8 +31,6 @@
/*
* @test ClassLiterals
* @summary test that new type arguments are emitted to classfile
- * @enablePreview
- * @modules java.base/jdk.internal.classfile.impl
*/
public class NewTypeArguments extends ClassfileTestHelper{
diff --git a/test/langtools/tools/javac/annotations/typeAnnotations/classfile/NoTargetAnnotations.java b/test/langtools/tools/javac/annotations/typeAnnotations/classfile/NoTargetAnnotations.java
index ffab642c1d5..65d5a639f35 100644
--- a/test/langtools/tools/javac/annotations/typeAnnotations/classfile/NoTargetAnnotations.java
+++ b/test/langtools/tools/javac/annotations/typeAnnotations/classfile/NoTargetAnnotations.java
@@ -34,8 +34,6 @@
* @test NoTargetAnnotations
* @summary test that annotations with no Target meta type is emitted
* only once as declaration annotation
- * @enablePreview
- * @modules java.base/jdk.internal.classfile.impl
*/
public class NoTargetAnnotations extends ClassfileTestHelper {
diff --git a/test/langtools/tools/javac/annotations/typeAnnotations/classfile/Scopes.java b/test/langtools/tools/javac/annotations/typeAnnotations/classfile/Scopes.java
index 35bc576a2ca..4025a61be6a 100644
--- a/test/langtools/tools/javac/annotations/typeAnnotations/classfile/Scopes.java
+++ b/test/langtools/tools/javac/annotations/typeAnnotations/classfile/Scopes.java
@@ -32,8 +32,6 @@
* @test
* @bug 6843077 8006775
* @summary Qualified inner type annotation accessible to the class.
- * @enablePreview
- * @modules java.base/jdk.internal.classfile.impl
*/
@Scopes.UniqueInner
diff --git a/test/langtools/tools/javac/annotations/typeAnnotations/classfile/StaticInitializer.java b/test/langtools/tools/javac/annotations/typeAnnotations/classfile/StaticInitializer.java
index 80341544789..b44faa4d6cf 100644
--- a/test/langtools/tools/javac/annotations/typeAnnotations/classfile/StaticInitializer.java
+++ b/test/langtools/tools/javac/annotations/typeAnnotations/classfile/StaticInitializer.java
@@ -30,8 +30,6 @@
* @test
* @bug 8136419 8200301
* @summary test that type annotations on entities in static initializers are emitted to classfile
- * @enablePreview
- * @modules java.base/jdk.internal.classfile.impl
* @compile -XDdeduplicateLambdas=false StaticInitializer.java
* @run main StaticInitializer
*/
diff --git a/test/langtools/tools/javac/annotations/typeAnnotations/classfile/SyntheticParameters.java b/test/langtools/tools/javac/annotations/typeAnnotations/classfile/SyntheticParameters.java
index 4b8d317d771..cc2dcf8277f 100644
--- a/test/langtools/tools/javac/annotations/typeAnnotations/classfile/SyntheticParameters.java
+++ b/test/langtools/tools/javac/annotations/typeAnnotations/classfile/SyntheticParameters.java
@@ -25,8 +25,6 @@
* @test SyntheticParameters
* @summary Test generation of annotations on inner class parameters.
* @library /lib/annotations/
- * @enablePreview
- * @modules java.base/jdk.internal.classfile.impl
* @run main SyntheticParameters
*/
diff --git a/test/langtools/tools/javac/annotations/typeAnnotations/classfile/T8008762.java b/test/langtools/tools/javac/annotations/typeAnnotations/classfile/T8008762.java
index 5dae330b193..4dbff9cd68f 100644
--- a/test/langtools/tools/javac/annotations/typeAnnotations/classfile/T8008762.java
+++ b/test/langtools/tools/javac/annotations/typeAnnotations/classfile/T8008762.java
@@ -26,8 +26,6 @@
* @bug 8008762
* @summary Type annotation on inner class in anonymous class
* shows up as regular annotation
- * @enablePreview
- * @modules java.base/jdk.internal.classfile.impl
*/
import java.lang.annotation.*;
import static java.lang.annotation.RetentionPolicy.*;
diff --git a/test/langtools/tools/javac/annotations/typeAnnotations/classfile/T8008769.java b/test/langtools/tools/javac/annotations/typeAnnotations/classfile/T8008769.java
index fc9ffdfef1d..0aa41def875 100644
--- a/test/langtools/tools/javac/annotations/typeAnnotations/classfile/T8008769.java
+++ b/test/langtools/tools/javac/annotations/typeAnnotations/classfile/T8008769.java
@@ -26,8 +26,6 @@
* @summary Repeated type-annotations on type parm of local variable
* are not written to classfile.
* @bug 8008769
- * @enablePreview
- * @modules java.base/jdk.internal.classfile.impl
*/
import java.lang.annotation.*;
import static java.lang.annotation.RetentionPolicy.*;
diff --git a/test/langtools/tools/javac/annotations/typeAnnotations/classfile/T8010015.java b/test/langtools/tools/javac/annotations/typeAnnotations/classfile/T8010015.java
index 635f4ce9fb2..045c75fa39f 100644
--- a/test/langtools/tools/javac/annotations/typeAnnotations/classfile/T8010015.java
+++ b/test/langtools/tools/javac/annotations/typeAnnotations/classfile/T8010015.java
@@ -25,8 +25,6 @@
* @test
* @summary Wrong classfile attribution in inner class of lambda expression.
* @bug 8010015
- * @enablePreview
- * @modules java.base/jdk.internal.classfile.impl
*/
import java.lang.annotation.*;
diff --git a/test/langtools/tools/javac/annotations/typeAnnotations/classfile/TestAnonInnerClasses.java b/test/langtools/tools/javac/annotations/typeAnnotations/classfile/TestAnonInnerClasses.java
index fc232d06b64..efb78c02ad3 100644
--- a/test/langtools/tools/javac/annotations/typeAnnotations/classfile/TestAnonInnerClasses.java
+++ b/test/langtools/tools/javac/annotations/typeAnnotations/classfile/TestAnonInnerClasses.java
@@ -32,9 +32,6 @@
* annotation place on type of element (a FIELD&TYPE_USE element on a field
* results in 2). Elements with no annotations expect 0.
* Source template is read in from testanoninner.template
- *
- * @enablePreview
- * @modules java.base/jdk.internal.classfile.impl
*/
import java.lang.classfile.*;
import java.lang.classfile.attribute.*;
diff --git a/test/langtools/tools/javac/annotations/typeAnnotations/classfile/TestNewCastArray.java b/test/langtools/tools/javac/annotations/typeAnnotations/classfile/TestNewCastArray.java
index 048c1836664..ea4f69ecaca 100644
--- a/test/langtools/tools/javac/annotations/typeAnnotations/classfile/TestNewCastArray.java
+++ b/test/langtools/tools/javac/annotations/typeAnnotations/classfile/TestNewCastArray.java
@@ -25,8 +25,6 @@
* @test
* @bug 8005681
* @summary Repeated annotations on new,array,cast.
- * @enablePreview
- * @modules java.base/jdk.internal.classfile.impl
*/
import java.lang.classfile.*;
import java.lang.classfile.attribute.*;
diff --git a/test/langtools/tools/javac/annotations/typeAnnotations/classfile/TypeAnnotationPropagationTest.java b/test/langtools/tools/javac/annotations/typeAnnotations/classfile/TypeAnnotationPropagationTest.java
index 9f7873bb2c0..46f9ba18e9b 100644
--- a/test/langtools/tools/javac/annotations/typeAnnotations/classfile/TypeAnnotationPropagationTest.java
+++ b/test/langtools/tools/javac/annotations/typeAnnotations/classfile/TypeAnnotationPropagationTest.java
@@ -25,8 +25,6 @@
* @test
* @bug 8144185
* @summary javac produces incorrect RuntimeInvisibleTypeAnnotations length attribute
- * @enablePreview
- * @modules java.base/jdk.internal.classfile.impl
*/
import static java.lang.annotation.ElementType.TYPE_USE;
diff --git a/test/langtools/tools/javac/annotations/typeAnnotations/classfile/TypeCasts.java b/test/langtools/tools/javac/annotations/typeAnnotations/classfile/TypeCasts.java
index 04907df1203..9a0ed02ae28 100644
--- a/test/langtools/tools/javac/annotations/typeAnnotations/classfile/TypeCasts.java
+++ b/test/langtools/tools/javac/annotations/typeAnnotations/classfile/TypeCasts.java
@@ -33,7 +33,6 @@
* @bug 6843077 8006775
* @summary test that typecasts annotation are emitted if only the cast
* expression is optimized away
- * @enablePreview
*/
public class TypeCasts extends ClassfileTestHelper{
diff --git a/test/langtools/tools/javac/annotations/typeAnnotations/classfile/Wildcards.java b/test/langtools/tools/javac/annotations/typeAnnotations/classfile/Wildcards.java
index 31d9294f120..3295d0a513b 100644
--- a/test/langtools/tools/javac/annotations/typeAnnotations/classfile/Wildcards.java
+++ b/test/langtools/tools/javac/annotations/typeAnnotations/classfile/Wildcards.java
@@ -32,7 +32,6 @@
* @test Wildcards
* @bug 6843077 8006775
* @summary test that annotations target wildcards get emitted to classfile
- * @enablePreview
*/
public class Wildcards extends ClassfileTestHelper {
public static void main(String[] args) throws Exception {
diff --git a/test/langtools/tools/javac/annotations/typeAnnotations/referenceinfos/ClassExtends.java b/test/langtools/tools/javac/annotations/typeAnnotations/referenceinfos/ClassExtends.java
index 8607b1cc312..c4581fc1bf3 100644
--- a/test/langtools/tools/javac/annotations/typeAnnotations/referenceinfos/ClassExtends.java
+++ b/test/langtools/tools/javac/annotations/typeAnnotations/referenceinfos/ClassExtends.java
@@ -27,8 +27,6 @@
* @test
* @bug 8042451 8164519
* @summary Test population of reference info for class extends clauses
- * @enablePreview
- * @modules java.base/jdk.internal.classfile.impl
* @compile -g Driver.java ReferenceInfoUtil.java ClassExtends.java
* @run main Driver ClassExtends
*/
diff --git a/test/langtools/tools/javac/annotations/typeAnnotations/referenceinfos/ClassTypeParam.java b/test/langtools/tools/javac/annotations/typeAnnotations/referenceinfos/ClassTypeParam.java
index 696d3b32929..2202766e450 100644
--- a/test/langtools/tools/javac/annotations/typeAnnotations/referenceinfos/ClassTypeParam.java
+++ b/test/langtools/tools/javac/annotations/typeAnnotations/referenceinfos/ClassTypeParam.java
@@ -27,8 +27,6 @@
* @test
* @bug 8042451
* @summary Test population of reference info for class type parameters
- * @enablePreview
- * @modules java.base/jdk.internal.classfile.impl
* @compile -g Driver.java ReferenceInfoUtil.java ClassTypeParam.java
* @run main Driver ClassTypeParam
*/
diff --git a/test/langtools/tools/javac/annotations/typeAnnotations/referenceinfos/ConstructorInvocationTypeArgument.java b/test/langtools/tools/javac/annotations/typeAnnotations/referenceinfos/ConstructorInvocationTypeArgument.java
index bcffb424827..f89ec2efce4 100644
--- a/test/langtools/tools/javac/annotations/typeAnnotations/referenceinfos/ConstructorInvocationTypeArgument.java
+++ b/test/langtools/tools/javac/annotations/typeAnnotations/referenceinfos/ConstructorInvocationTypeArgument.java
@@ -25,8 +25,6 @@
* @test
* @bug 8042451
* @summary Test population of reference info for constructor invocation type argument
- * @enablePreview
- * @modules java.base/jdk.internal.classfile.impl
* @compile -g Driver.java ReferenceInfoUtil.java ConstructorInvocationTypeArgument.java
* @run main Driver ConstructorInvocationTypeArgument
*/
diff --git a/test/langtools/tools/javac/annotations/typeAnnotations/referenceinfos/Constructors.java b/test/langtools/tools/javac/annotations/typeAnnotations/referenceinfos/Constructors.java
index beab5ea9fb5..89128a60888 100644
--- a/test/langtools/tools/javac/annotations/typeAnnotations/referenceinfos/Constructors.java
+++ b/test/langtools/tools/javac/annotations/typeAnnotations/referenceinfos/Constructors.java
@@ -25,8 +25,6 @@
* @test
* @bug 8026791 8042451
* @summary Test population of reference info for constructor results
- * @enablePreview
- * @modules java.base/jdk.internal.classfile.impl
* @compile -g Driver.java ReferenceInfoUtil.java Constructors.java
* @run main Driver Constructors
*/
diff --git a/test/langtools/tools/javac/annotations/typeAnnotations/referenceinfos/ExceptionParameters.java b/test/langtools/tools/javac/annotations/typeAnnotations/referenceinfos/ExceptionParameters.java
index b479f7dcfdc..e179764a1e8 100644
--- a/test/langtools/tools/javac/annotations/typeAnnotations/referenceinfos/ExceptionParameters.java
+++ b/test/langtools/tools/javac/annotations/typeAnnotations/referenceinfos/ExceptionParameters.java
@@ -28,8 +28,6 @@
* @bug 8028576 8042451
* @summary Test population of reference info for exception parameters
* @author Werner Dietl
- * @enablePreview
- * @modules java.base/jdk.internal.classfile.impl
* @compile -g Driver.java ReferenceInfoUtil.java ExceptionParameters.java
* @run main Driver ExceptionParameters
*/
diff --git a/test/langtools/tools/javac/annotations/typeAnnotations/referenceinfos/Fields.java b/test/langtools/tools/javac/annotations/typeAnnotations/referenceinfos/Fields.java
index 7a77ac2390b..089f32ae775 100644
--- a/test/langtools/tools/javac/annotations/typeAnnotations/referenceinfos/Fields.java
+++ b/test/langtools/tools/javac/annotations/typeAnnotations/referenceinfos/Fields.java
@@ -25,8 +25,6 @@
* @test
* @bug 8042451 8208470
* @summary Test population of reference info for field
- * @enablePreview
- * @modules java.base/jdk.internal.classfile.impl
* @compile -g Driver.java ReferenceInfoUtil.java Fields.java
* @run main Driver Fields
*/
diff --git a/test/langtools/tools/javac/annotations/typeAnnotations/referenceinfos/FromSpecification.java b/test/langtools/tools/javac/annotations/typeAnnotations/referenceinfos/FromSpecification.java
index b52a20353d8..b89517c4376 100644
--- a/test/langtools/tools/javac/annotations/typeAnnotations/referenceinfos/FromSpecification.java
+++ b/test/langtools/tools/javac/annotations/typeAnnotations/referenceinfos/FromSpecification.java
@@ -27,8 +27,6 @@
* @test
* @bug 8042451
* @summary Test that the examples from the manual are stored as expected
- * @enablePreview
- * @modules java.base/jdk.internal.classfile.impl
* @compile -g Driver.java ReferenceInfoUtil.java FromSpecification.java
* @run main Driver FromSpecification
*/
diff --git a/test/langtools/tools/javac/annotations/typeAnnotations/referenceinfos/Initializers.java b/test/langtools/tools/javac/annotations/typeAnnotations/referenceinfos/Initializers.java
index 706edb453b1..70af9591900 100644
--- a/test/langtools/tools/javac/annotations/typeAnnotations/referenceinfos/Initializers.java
+++ b/test/langtools/tools/javac/annotations/typeAnnotations/referenceinfos/Initializers.java
@@ -28,8 +28,6 @@
* @bug 8013852 8042451
* @summary Test population of reference info for instance and class initializers
* @author Werner Dietl
- * @enablePreview
- * @modules java.base/jdk.internal.classfile.impl
* @compile -g Driver.java ReferenceInfoUtil.java Initializers.java
* @run main Driver Initializers
*/
diff --git a/test/langtools/tools/javac/annotations/typeAnnotations/referenceinfos/Lambda.java b/test/langtools/tools/javac/annotations/typeAnnotations/referenceinfos/Lambda.java
index 690f0ddc186..1d78183e68e 100644
--- a/test/langtools/tools/javac/annotations/typeAnnotations/referenceinfos/Lambda.java
+++ b/test/langtools/tools/javac/annotations/typeAnnotations/referenceinfos/Lambda.java
@@ -26,8 +26,6 @@
* @bug 8008077 8029721 8042451 8043974
* @summary Test population of reference info for lambda expressions
* javac crash for annotated parameter type of lambda in a field
- * @enablePreview
- * @modules java.base/jdk.internal.classfile.impl
* @ignore 8057687 emit correct byte code an attributes for type annotations
* @compile -g Driver.java ReferenceInfoUtil.java Lambda.java
* @run main Driver Lambda
diff --git a/test/langtools/tools/javac/annotations/typeAnnotations/referenceinfos/MethodInvocationTypeArgument.java b/test/langtools/tools/javac/annotations/typeAnnotations/referenceinfos/MethodInvocationTypeArgument.java
index f0df24e3805..38026251a19 100644
--- a/test/langtools/tools/javac/annotations/typeAnnotations/referenceinfos/MethodInvocationTypeArgument.java
+++ b/test/langtools/tools/javac/annotations/typeAnnotations/referenceinfos/MethodInvocationTypeArgument.java
@@ -25,8 +25,6 @@
* @test
* @bug 8042451
* @summary Test population of reference info for method invocation type arguments
- * @enablePreview
- * @modules java.base/jdk.internal.classfile.impl
* @compile -g Driver.java ReferenceInfoUtil.java MethodInvocationTypeArgument.java
* @run main Driver MethodInvocationTypeArgument
*/
diff --git a/test/langtools/tools/javac/annotations/typeAnnotations/referenceinfos/MethodParameters.java b/test/langtools/tools/javac/annotations/typeAnnotations/referenceinfos/MethodParameters.java
index 2f5b6d43636..edc9ae18a32 100644
--- a/test/langtools/tools/javac/annotations/typeAnnotations/referenceinfos/MethodParameters.java
+++ b/test/langtools/tools/javac/annotations/typeAnnotations/referenceinfos/MethodParameters.java
@@ -27,8 +27,6 @@
* @test
* @bug 8042451
* @summary Test population of reference info for method parameters
- * @enablePreview
- * @modules java.base/jdk.internal.classfile.impl
* @compile -g Driver.java ReferenceInfoUtil.java MethodParameters.java
* @run main Driver MethodParameters
*/
diff --git a/test/langtools/tools/javac/annotations/typeAnnotations/referenceinfos/MethodReceivers.java b/test/langtools/tools/javac/annotations/typeAnnotations/referenceinfos/MethodReceivers.java
index faae9c91c04..d379301005f 100644
--- a/test/langtools/tools/javac/annotations/typeAnnotations/referenceinfos/MethodReceivers.java
+++ b/test/langtools/tools/javac/annotations/typeAnnotations/referenceinfos/MethodReceivers.java
@@ -27,8 +27,6 @@
* @test
* @bug 8042451
* @summary Test population of reference info for method receivers
- * @enablePreview
- * @modules java.base/jdk.internal.classfile.impl
* @compile -g Driver.java ReferenceInfoUtil.java MethodReceivers.java
* @run main Driver MethodReceivers
*/
diff --git a/test/langtools/tools/javac/annotations/typeAnnotations/referenceinfos/MethodReturns.java b/test/langtools/tools/javac/annotations/typeAnnotations/referenceinfos/MethodReturns.java
index ee7248db119..b174ea414c4 100644
--- a/test/langtools/tools/javac/annotations/typeAnnotations/referenceinfos/MethodReturns.java
+++ b/test/langtools/tools/javac/annotations/typeAnnotations/referenceinfos/MethodReturns.java
@@ -27,8 +27,6 @@
* @test
* @bug 8042451
* @summary Test population of reference info for method return
- * @enablePreview
- * @modules java.base/jdk.internal.classfile.impl
* @compile -g Driver.java ReferenceInfoUtil.java MethodReturns.java
* @run main Driver MethodReturns
*/
diff --git a/test/langtools/tools/javac/annotations/typeAnnotations/referenceinfos/MethodThrows.java b/test/langtools/tools/javac/annotations/typeAnnotations/referenceinfos/MethodThrows.java
index 546b8cdeb0a..69de815909e 100644
--- a/test/langtools/tools/javac/annotations/typeAnnotations/referenceinfos/MethodThrows.java
+++ b/test/langtools/tools/javac/annotations/typeAnnotations/referenceinfos/MethodThrows.java
@@ -27,8 +27,6 @@
* @test
* @bug 8042451
* @summary Test population of reference info for method exception clauses
- * @enablePreview
- * @modules java.base/jdk.internal.classfile.impl
* @compile -g Driver.java ReferenceInfoUtil.java MethodThrows.java
* @run main Driver MethodThrows
*/
diff --git a/test/langtools/tools/javac/annotations/typeAnnotations/referenceinfos/MethodTypeParam.java b/test/langtools/tools/javac/annotations/typeAnnotations/referenceinfos/MethodTypeParam.java
index fa6203e3fff..05a8c09c1cf 100644
--- a/test/langtools/tools/javac/annotations/typeAnnotations/referenceinfos/MethodTypeParam.java
+++ b/test/langtools/tools/javac/annotations/typeAnnotations/referenceinfos/MethodTypeParam.java
@@ -28,8 +28,6 @@
* @test
* @bug 8042451
* @summary Test population of reference info for method type parameters
- * @enablePreview
- * @modules java.base/jdk.internal.classfile.impl
* @compile -g Driver.java ReferenceInfoUtil.java MethodTypeParam.java
* @run main Driver MethodTypeParam
*/
diff --git a/test/langtools/tools/javac/annotations/typeAnnotations/referenceinfos/MultiCatch.java b/test/langtools/tools/javac/annotations/typeAnnotations/referenceinfos/MultiCatch.java
index a3d927a0fb9..a1883ff4864 100644
--- a/test/langtools/tools/javac/annotations/typeAnnotations/referenceinfos/MultiCatch.java
+++ b/test/langtools/tools/javac/annotations/typeAnnotations/referenceinfos/MultiCatch.java
@@ -28,8 +28,6 @@
* @bug 8006732 8006775 8042451
* @summary Test population of reference info for multicatch exception parameters
* @author Werner Dietl
- * @enablePreview
- * @modules java.base/jdk.internal.classfile.impl
* @compile -g Driver.java ReferenceInfoUtil.java MultiCatch.java
* @run main Driver MultiCatch
*/
diff --git a/test/langtools/tools/javac/annotations/typeAnnotations/referenceinfos/NestedTypes.java b/test/langtools/tools/javac/annotations/typeAnnotations/referenceinfos/NestedTypes.java
index f3b54ff35a1..37aedf75f62 100644
--- a/test/langtools/tools/javac/annotations/typeAnnotations/referenceinfos/NestedTypes.java
+++ b/test/langtools/tools/javac/annotations/typeAnnotations/referenceinfos/NestedTypes.java
@@ -27,8 +27,6 @@
* @test
* @bug 8042451 8044009 8044010
* @summary Test population of reference info for nested types
- * @enablePreview
- * @modules java.base/jdk.internal.classfile.impl
* @ignore 8057687 emit correct byte code an attributes for type annotations
* @compile -g Driver.java ReferenceInfoUtil.java NestedTypes.java
* @run main Driver NestedTypes
diff --git a/test/langtools/tools/javac/annotations/typeAnnotations/referenceinfos/NewObjects.java b/test/langtools/tools/javac/annotations/typeAnnotations/referenceinfos/NewObjects.java
index cac938a4869..ff90b8bb2da 100644
--- a/test/langtools/tools/javac/annotations/typeAnnotations/referenceinfos/NewObjects.java
+++ b/test/langtools/tools/javac/annotations/typeAnnotations/referenceinfos/NewObjects.java
@@ -27,8 +27,6 @@
* @test
* @bug 8042451
* @summary Test population of reference info for new object creations
- * @enablePreview
- * @modules java.base/jdk.internal.classfile.impl
* @compile -g Driver.java ReferenceInfoUtil.java NewObjects.java
* @run main Driver NewObjects
*/
diff --git a/test/langtools/tools/javac/annotations/typeAnnotations/referenceinfos/RepeatingTypeAnnotations.java b/test/langtools/tools/javac/annotations/typeAnnotations/referenceinfos/RepeatingTypeAnnotations.java
index 70cb3a94bd8..1d78cfed508 100644
--- a/test/langtools/tools/javac/annotations/typeAnnotations/referenceinfos/RepeatingTypeAnnotations.java
+++ b/test/langtools/tools/javac/annotations/typeAnnotations/referenceinfos/RepeatingTypeAnnotations.java
@@ -26,8 +26,6 @@
/*
* @test
* @summary Test population of reference info for repeating type annotations
- * @enablePreview
- * @modules java.base/jdk.internal.classfile.impl
* @compile -g Driver.java ReferenceInfoUtil.java RepeatingTypeAnnotations.java
* @run main Driver RepeatingTypeAnnotations
* @author Werner Dietl
diff --git a/test/langtools/tools/javac/annotations/typeAnnotations/referenceinfos/ResourceVariable.java b/test/langtools/tools/javac/annotations/typeAnnotations/referenceinfos/ResourceVariable.java
index e1be3ea1435..bb5944d400c 100644
--- a/test/langtools/tools/javac/annotations/typeAnnotations/referenceinfos/ResourceVariable.java
+++ b/test/langtools/tools/javac/annotations/typeAnnotations/referenceinfos/ResourceVariable.java
@@ -25,8 +25,6 @@
* @test
* @bug 8042451
* @summary Test population of reference info for resource variable
- * @enablePreview
- * @modules java.base/jdk.internal.classfile.impl
* @compile -g Driver.java ReferenceInfoUtil.java ResourceVariable.java
* @run main Driver ResourceVariable
*/
diff --git a/test/langtools/tools/javac/annotations/typeAnnotations/referenceinfos/TypeCasts.java b/test/langtools/tools/javac/annotations/typeAnnotations/referenceinfos/TypeCasts.java
index 9afaffe0bf1..612601538b6 100644
--- a/test/langtools/tools/javac/annotations/typeAnnotations/referenceinfos/TypeCasts.java
+++ b/test/langtools/tools/javac/annotations/typeAnnotations/referenceinfos/TypeCasts.java
@@ -27,8 +27,6 @@
* @test
* @bug 8042451
* @summary Test population of reference info for type casts
- * @enablePreview
- * @modules java.base/jdk.internal.classfile.impl
* @compile -g Driver.java ReferenceInfoUtil.java TypeCasts.java
* @run main Driver TypeCasts
*/
diff --git a/test/langtools/tools/javac/annotations/typeAnnotations/referenceinfos/TypeTests.java b/test/langtools/tools/javac/annotations/typeAnnotations/referenceinfos/TypeTests.java
index 5cbb6a370fa..e82c5f4009a 100644
--- a/test/langtools/tools/javac/annotations/typeAnnotations/referenceinfos/TypeTests.java
+++ b/test/langtools/tools/javac/annotations/typeAnnotations/referenceinfos/TypeTests.java
@@ -27,8 +27,6 @@
* @test
* @bug 8042451
* @summary Test population of reference info for class literals
- * @enablePreview
- * @modules java.base/jdk.internal.classfile.impl
* @compile -g Driver.java ReferenceInfoUtil.java TypeTests.java
* @run main Driver TypeTests
*/
diff --git a/test/langtools/tools/javac/cast/intersection/DuplicatedCheckcastTest.java b/test/langtools/tools/javac/cast/intersection/DuplicatedCheckcastTest.java
index 544314832e8..0bf600044b1 100644
--- a/test/langtools/tools/javac/cast/intersection/DuplicatedCheckcastTest.java
+++ b/test/langtools/tools/javac/cast/intersection/DuplicatedCheckcastTest.java
@@ -21,16 +21,14 @@
* questions.
*/
-/**
+/*
* @test
* @bug 8263642 8268885
* @summary javac should not emit duplicate checkcast for first bound of intersection type in cast
* duplicate checkcast when destination type is not first type of intersection type
* @library /tools/lib
- * @enablePreview
* @modules jdk.compiler/com.sun.tools.javac.api
* jdk.compiler/com.sun.tools.javac.main
- * java.base/jdk.internal.classfile.impl
* @build toolbox.ToolBox toolbox.JavacTask
* @run main DuplicatedCheckcastTest
*/
diff --git a/test/langtools/tools/javac/classfiles/InnerClasses/SyntheticClasses.java b/test/langtools/tools/javac/classfiles/InnerClasses/SyntheticClasses.java
index eca1b840b3a..db06862d3ae 100644
--- a/test/langtools/tools/javac/classfiles/InnerClasses/SyntheticClasses.java
+++ b/test/langtools/tools/javac/classfiles/InnerClasses/SyntheticClasses.java
@@ -25,8 +25,6 @@
* @bug 8034854
* @summary Verify that the InnerClasses attribute has outer_class_info_index zero if it has
* inner_name_index zero (for synthetic classes)
- * @enablePreview
- * @modules java.base/jdk.internal.classfile.impl
* @compile SyntheticClasses.java
* @run main SyntheticClasses
*/
diff --git a/test/langtools/tools/javac/classfiles/T8255757/T8255757.java b/test/langtools/tools/javac/classfiles/T8255757/T8255757.java
index 231a132e579..b165967bf5e 100644
--- a/test/langtools/tools/javac/classfiles/T8255757/T8255757.java
+++ b/test/langtools/tools/javac/classfiles/T8255757/T8255757.java
@@ -26,10 +26,8 @@
* @bug 8255757
* @summary Javac shouldn't emit duplicate pool entries on array::clone
* @library /tools/lib
- * @enablePreview
* @modules jdk.compiler/com.sun.tools.javac.api
* jdk.compiler/com.sun.tools.javac.main
- * java.base/jdk.internal.classfile.impl
* @build toolbox.ToolBox toolbox.JavacTask
* @run main T8255757
*/
diff --git a/test/langtools/tools/javac/classfiles/attributes/AnnotationDefault/AnnotationDefaultTest.java b/test/langtools/tools/javac/classfiles/attributes/AnnotationDefault/AnnotationDefaultTest.java
index 2911e58820f..f67fa87474e 100644
--- a/test/langtools/tools/javac/classfiles/attributes/AnnotationDefault/AnnotationDefaultTest.java
+++ b/test/langtools/tools/javac/classfiles/attributes/AnnotationDefault/AnnotationDefaultTest.java
@@ -26,7 +26,6 @@
* @bug 8042947
* @summary Checking AnnotationDefault attribute.
* @library /tools/lib /tools/javac/lib ../lib
- * @enablePreview
* @modules jdk.compiler/com.sun.tools.javac.api
* jdk.compiler/com.sun.tools.javac.main
* java.base/jdk.internal.classfile.impl
diff --git a/test/langtools/tools/javac/classfiles/attributes/EnclosingMethod/EnclosingMethodTest.java b/test/langtools/tools/javac/classfiles/attributes/EnclosingMethod/EnclosingMethodTest.java
index 924916f5cbd..69a40ddbf45 100644
--- a/test/langtools/tools/javac/classfiles/attributes/EnclosingMethod/EnclosingMethodTest.java
+++ b/test/langtools/tools/javac/classfiles/attributes/EnclosingMethod/EnclosingMethodTest.java
@@ -26,7 +26,6 @@
* @bug 8042931 8215470
* @summary Checking EnclosingMethod attribute of anonymous/local class.
* @library /tools/lib /tools/javac/lib ../lib
- * @enablePreview
* @modules jdk.compiler/com.sun.tools.javac.api
* jdk.compiler/com.sun.tools.javac.main
* java.base/jdk.internal.classfile.impl
diff --git a/test/langtools/tools/javac/classfiles/attributes/LineNumberTable/LineNumberTest.java b/test/langtools/tools/javac/classfiles/attributes/LineNumberTable/LineNumberTest.java
index 8312b535f50..3d3d4f69d0a 100644
--- a/test/langtools/tools/javac/classfiles/attributes/LineNumberTable/LineNumberTest.java
+++ b/test/langtools/tools/javac/classfiles/attributes/LineNumberTable/LineNumberTest.java
@@ -26,7 +26,6 @@
* @summary Tests a line number table attribute for language constructions in different containers.
* @bug 8040131
* @library /tools/lib /tools/javac/lib ../lib
- * @enablePreview
* @modules jdk.compiler/com.sun.tools.javac.api
* jdk.compiler/com.sun.tools.javac.main
* jdk.compiler/com.sun.tools.javac.util
diff --git a/test/langtools/tools/javac/classfiles/attributes/LineNumberTable/MultipleRecordPatterns.java b/test/langtools/tools/javac/classfiles/attributes/LineNumberTable/MultipleRecordPatterns.java
index 53a60b69cb0..b2b3e1e8a2c 100644
--- a/test/langtools/tools/javac/classfiles/attributes/LineNumberTable/MultipleRecordPatterns.java
+++ b/test/langtools/tools/javac/classfiles/attributes/LineNumberTable/MultipleRecordPatterns.java
@@ -26,7 +26,6 @@
* @bug 8307814
* @summary Verify correct LineNumberTable is generated for unrolled record patterns.
* @library /tools/lib /tools/javac/lib ../lib
- * @enablePreview
* @modules jdk.compiler/com.sun.tools.javac.api
* jdk.compiler/com.sun.tools.javac.main
* jdk.compiler/com.sun.tools.javac.util
diff --git a/test/langtools/tools/javac/classfiles/attributes/LineNumberTable/RuleSwitchBreaks.java b/test/langtools/tools/javac/classfiles/attributes/LineNumberTable/RuleSwitchBreaks.java
index 58f1386a000..a1bb8a6150c 100644
--- a/test/langtools/tools/javac/classfiles/attributes/LineNumberTable/RuleSwitchBreaks.java
+++ b/test/langtools/tools/javac/classfiles/attributes/LineNumberTable/RuleSwitchBreaks.java
@@ -26,7 +26,6 @@
* @bug 8262891
* @summary Verify correct LineNumberTable for rule switches.
* @library /tools/lib /tools/javac/lib ../lib
- * @enablePreview
* @modules jdk.compiler/com.sun.tools.javac.api
* jdk.compiler/com.sun.tools.javac.main
* jdk.compiler/com.sun.tools.javac.util
diff --git a/test/langtools/tools/javac/classfiles/attributes/LineNumberTable/StringSwitchBreaks.java b/test/langtools/tools/javac/classfiles/attributes/LineNumberTable/StringSwitchBreaks.java
index e22a847370b..e445818553e 100644
--- a/test/langtools/tools/javac/classfiles/attributes/LineNumberTable/StringSwitchBreaks.java
+++ b/test/langtools/tools/javac/classfiles/attributes/LineNumberTable/StringSwitchBreaks.java
@@ -26,7 +26,6 @@
* @bug 8261606
* @summary Tests a line number table attribute for language constructions in different containers.
* @library /tools/lib /tools/javac/lib ../lib
- * @enablePreview
* @modules jdk.compiler/com.sun.tools.javac.api
* jdk.compiler/com.sun.tools.javac.main
* jdk.compiler/com.sun.tools.javac.util
diff --git a/test/langtools/tools/javac/classfiles/attributes/LineNumberTable/T8050993.java b/test/langtools/tools/javac/classfiles/attributes/LineNumberTable/T8050993.java
index 934a0ef09e7..5c8af7e3a71 100644
--- a/test/langtools/tools/javac/classfiles/attributes/LineNumberTable/T8050993.java
+++ b/test/langtools/tools/javac/classfiles/attributes/LineNumberTable/T8050993.java
@@ -2,8 +2,6 @@
* @test /nodynamiccopyright/
* @bug 8050993
* @summary Verify that the condition in the conditional lexpression gets a LineNumberTable entry
- * @enablePreview
- * @modules java.base/jdk.internal.classfile.impl
* @compile -g T8050993.java
* @run main T8050993
*/
diff --git a/test/langtools/tools/javac/classfiles/attributes/LineNumberTable/T8314275.java b/test/langtools/tools/javac/classfiles/attributes/LineNumberTable/T8314275.java
index 07a1e7c7575..d17ae238704 100644
--- a/test/langtools/tools/javac/classfiles/attributes/LineNumberTable/T8314275.java
+++ b/test/langtools/tools/javac/classfiles/attributes/LineNumberTable/T8314275.java
@@ -25,7 +25,6 @@
* @bug 8314275
* @summary Tests a line number table attribute for switch expression
* @library /tools/lib /tools/javac/lib ../lib
- * @enablePreview
* @modules jdk.compiler/com.sun.tools.javac.api
* jdk.compiler/com.sun.tools.javac.main
* jdk.compiler/com.sun.tools.javac.util
diff --git a/test/langtools/tools/javac/classfiles/attributes/LocalVariableTable/LocalVariableTableTest.java b/test/langtools/tools/javac/classfiles/attributes/LocalVariableTable/LocalVariableTableTest.java
index 1139b8d2fde..2ce77364bea 100644
--- a/test/langtools/tools/javac/classfiles/attributes/LocalVariableTable/LocalVariableTableTest.java
+++ b/test/langtools/tools/javac/classfiles/attributes/LocalVariableTable/LocalVariableTableTest.java
@@ -26,7 +26,6 @@
* @summary local variable table attribute test.
* @bug 8040097
* @library /tools/lib /tools/javac/lib ../lib
- * @enablePreview
* @modules jdk.compiler/com.sun.tools.javac.api
* jdk.compiler/com.sun.tools.javac.main
* jdk.compiler/com.sun.tools.javac.util
diff --git a/test/langtools/tools/javac/classfiles/attributes/LocalVariableTable/LocalVariableTypeTableTest.java b/test/langtools/tools/javac/classfiles/attributes/LocalVariableTable/LocalVariableTypeTableTest.java
index 6681231e4b2..0f4ed838edd 100644
--- a/test/langtools/tools/javac/classfiles/attributes/LocalVariableTable/LocalVariableTypeTableTest.java
+++ b/test/langtools/tools/javac/classfiles/attributes/LocalVariableTable/LocalVariableTypeTableTest.java
@@ -26,7 +26,6 @@
* @summary local variable type table attribute test.
* @bug 8040097
* @library /tools/lib /tools/javac/lib ../lib
- * @enablePreview
* @modules jdk.compiler/com.sun.tools.javac.api
* jdk.compiler/com.sun.tools.javac.main
* jdk.compiler/com.sun.tools.javac.util
diff --git a/test/langtools/tools/javac/classfiles/attributes/Module/ModuleFlagTest.java b/test/langtools/tools/javac/classfiles/attributes/Module/ModuleFlagTest.java
index a0e88b7c602..2dcee4d16e1 100644
--- a/test/langtools/tools/javac/classfiles/attributes/Module/ModuleFlagTest.java
+++ b/test/langtools/tools/javac/classfiles/attributes/Module/ModuleFlagTest.java
@@ -26,11 +26,9 @@
* @bug 8080878
* @summary Checking ACC_MODULE flag is generated for module-info.
* @library /tools/lib
- * @enablePreview
* @modules jdk.compiler/com.sun.tools.javac.api
* jdk.compiler/com.sun.tools.javac.main
* jdk.compiler/com.sun.tools.javac.util
- * java.base/jdk.internal.classfile.impl
* @build toolbox.ToolBox toolbox.JavacTask toolbox.ToolBox
* @run main ModuleFlagTest
*/
diff --git a/test/langtools/tools/javac/classfiles/attributes/Module/ModuleTest.java b/test/langtools/tools/javac/classfiles/attributes/Module/ModuleTest.java
index c6a329b7d0b..cf09ce7ca39 100644
--- a/test/langtools/tools/javac/classfiles/attributes/Module/ModuleTest.java
+++ b/test/langtools/tools/javac/classfiles/attributes/Module/ModuleTest.java
@@ -25,12 +25,10 @@
* @test
* @summary Module attribute tests
* @bug 8080878 8161906 8162713 8170250
- * @enablePreview
* @modules java.compiler
* jdk.compiler/com.sun.tools.javac.api
* jdk.compiler/com.sun.tools.javac.main
* jdk.compiler/com.sun.tools.javac.util
- * java.base/jdk.internal.classfile.impl
* @library /tools/lib ../lib /tools/javac/lib
* @build toolbox.ToolBox toolbox.JavacTask toolbox.ToolBox
* TestBase TestResult ModuleTestBase
diff --git a/test/langtools/tools/javac/classfiles/attributes/Signature/ConstructorTest.java b/test/langtools/tools/javac/classfiles/attributes/Signature/ConstructorTest.java
index ae6b5f740c4..20012318ea7 100644
--- a/test/langtools/tools/javac/classfiles/attributes/Signature/ConstructorTest.java
+++ b/test/langtools/tools/javac/classfiles/attributes/Signature/ConstructorTest.java
@@ -26,7 +26,6 @@
* @bug 8049238
* @summary Checks Signature attribute for constructors.
* @library /tools/lib /tools/javac/lib ../lib
- * @enablePreview
* @modules jdk.compiler/com.sun.tools.javac.api
* jdk.compiler/com.sun.tools.javac.main
* java.base/jdk.internal.classfile.impl
diff --git a/test/langtools/tools/javac/classfiles/attributes/Signature/EnumTest.java b/test/langtools/tools/javac/classfiles/attributes/Signature/EnumTest.java
index 661b3405735..b7e6d2ca99a 100644
--- a/test/langtools/tools/javac/classfiles/attributes/Signature/EnumTest.java
+++ b/test/langtools/tools/javac/classfiles/attributes/Signature/EnumTest.java
@@ -26,7 +26,6 @@
* @bug 8049238
* @summary Checks Signature attribute for enum.
* @library /tools/lib /tools/javac/lib ../lib
- * @enablePreview
* @modules jdk.compiler/com.sun.tools.javac.api
* jdk.compiler/com.sun.tools.javac.main
* java.base/jdk.internal.classfile.impl
diff --git a/test/langtools/tools/javac/classfiles/attributes/Signature/ExceptionTest.java b/test/langtools/tools/javac/classfiles/attributes/Signature/ExceptionTest.java
index d15efea17df..54706e2822b 100644
--- a/test/langtools/tools/javac/classfiles/attributes/Signature/ExceptionTest.java
+++ b/test/langtools/tools/javac/classfiles/attributes/Signature/ExceptionTest.java
@@ -26,7 +26,6 @@
* @bug 8049238
* @summary Checks Signature attribute for methods which throw exceptions.
* @library /tools/lib /tools/javac/lib ../lib
- * @enablePreview
* @modules jdk.compiler/com.sun.tools.javac.api
* jdk.compiler/com.sun.tools.javac.main
* java.base/jdk.internal.classfile.impl
diff --git a/test/langtools/tools/javac/classfiles/attributes/Signature/FieldTest.java b/test/langtools/tools/javac/classfiles/attributes/Signature/FieldTest.java
index e5a7dfa480e..795a4d30bea 100644
--- a/test/langtools/tools/javac/classfiles/attributes/Signature/FieldTest.java
+++ b/test/langtools/tools/javac/classfiles/attributes/Signature/FieldTest.java
@@ -26,7 +26,6 @@
* @bug 8049238
* @summary Checks Signature attribute for fields.
* @library /tools/lib /tools/javac/lib ../lib
- * @enablePreview
* @modules jdk.compiler/com.sun.tools.javac.api
* jdk.compiler/com.sun.tools.javac.main
* java.base/jdk.internal.classfile.impl
diff --git a/test/langtools/tools/javac/classfiles/attributes/Signature/InnerClassTest.java b/test/langtools/tools/javac/classfiles/attributes/Signature/InnerClassTest.java
index ae3670aca03..740607d56c0 100644
--- a/test/langtools/tools/javac/classfiles/attributes/Signature/InnerClassTest.java
+++ b/test/langtools/tools/javac/classfiles/attributes/Signature/InnerClassTest.java
@@ -26,7 +26,6 @@
* @bug 8049238
* @summary Checks Signature attribute for inner classes.
* @library /tools/lib /tools/javac/lib ../lib
- * @enablePreview
* @modules jdk.compiler/com.sun.tools.javac.api
* jdk.compiler/com.sun.tools.javac.main
* java.base/jdk.internal.classfile.impl
diff --git a/test/langtools/tools/javac/classfiles/attributes/Signature/MethodParameterTest.java b/test/langtools/tools/javac/classfiles/attributes/Signature/MethodParameterTest.java
index 3444cc14ce7..6966ed1852c 100644
--- a/test/langtools/tools/javac/classfiles/attributes/Signature/MethodParameterTest.java
+++ b/test/langtools/tools/javac/classfiles/attributes/Signature/MethodParameterTest.java
@@ -26,7 +26,6 @@
* @bug 8049238
* @summary Checks Signature attribute for method parameters.
* @library /tools/lib /tools/javac/lib ../lib
- * @enablePreview
* @modules jdk.compiler/com.sun.tools.javac.api
* jdk.compiler/com.sun.tools.javac.main
* java.base/jdk.internal.classfile.impl
diff --git a/test/langtools/tools/javac/classfiles/attributes/Signature/MethodTypeBoundTest.java b/test/langtools/tools/javac/classfiles/attributes/Signature/MethodTypeBoundTest.java
index 51e668779b6..2131b5a4f02 100644
--- a/test/langtools/tools/javac/classfiles/attributes/Signature/MethodTypeBoundTest.java
+++ b/test/langtools/tools/javac/classfiles/attributes/Signature/MethodTypeBoundTest.java
@@ -26,7 +26,6 @@
* @bug 8049238
* @summary Checks Signature attribute for type bounds.
* @library /tools/lib /tools/javac/lib ../lib
- * @enablePreview
* @modules jdk.compiler/com.sun.tools.javac.api
* jdk.compiler/com.sun.tools.javac.main
* java.base/jdk.internal.classfile.impl
diff --git a/test/langtools/tools/javac/classfiles/attributes/Signature/ReturnTypeTest.java b/test/langtools/tools/javac/classfiles/attributes/Signature/ReturnTypeTest.java
index e805baca82a..cce155bbb71 100644
--- a/test/langtools/tools/javac/classfiles/attributes/Signature/ReturnTypeTest.java
+++ b/test/langtools/tools/javac/classfiles/attributes/Signature/ReturnTypeTest.java
@@ -26,7 +26,6 @@
* @bug 8049238
* @summary Checks Signature attribute for array return type of method.
* @library /tools/lib /tools/javac/lib ../lib
- * @enablePreview
* @modules java.desktop
* jdk.compiler/com.sun.tools.javac.api
* jdk.compiler/com.sun.tools.javac.main
diff --git a/test/langtools/tools/javac/classfiles/attributes/SourceFile/AnonymousClassTest.java b/test/langtools/tools/javac/classfiles/attributes/SourceFile/AnonymousClassTest.java
index 63eb7369ff0..15696c89bee 100644
--- a/test/langtools/tools/javac/classfiles/attributes/SourceFile/AnonymousClassTest.java
+++ b/test/langtools/tools/javac/classfiles/attributes/SourceFile/AnonymousClassTest.java
@@ -26,7 +26,6 @@
* @summary sourcefile attribute test for anonymous class.
* @bug 8040129
* @library /tools/lib /tools/javac/lib ../lib
- * @enablePreview
* @modules jdk.compiler/com.sun.tools.javac.api
* jdk.compiler/com.sun.tools.javac.main
* java.base/jdk.internal.classfile.impl
diff --git a/test/langtools/tools/javac/classfiles/attributes/SourceFile/InnerClassTest.java b/test/langtools/tools/javac/classfiles/attributes/SourceFile/InnerClassTest.java
index e2442f421d8..d8cd067408f 100644
--- a/test/langtools/tools/javac/classfiles/attributes/SourceFile/InnerClassTest.java
+++ b/test/langtools/tools/javac/classfiles/attributes/SourceFile/InnerClassTest.java
@@ -26,7 +26,6 @@
* @summary sourcefile attribute test for inner class.
* @bug 8040129
* @library /tools/lib /tools/javac/lib ../lib
- * @enablePreview
* @modules jdk.compiler/com.sun.tools.javac.api
* jdk.compiler/com.sun.tools.javac.main
* java.base/jdk.internal.classfile.impl
diff --git a/test/langtools/tools/javac/classfiles/attributes/SourceFile/LocalClassTest.java b/test/langtools/tools/javac/classfiles/attributes/SourceFile/LocalClassTest.java
index a5b44936ede..dc45a92d407 100644
--- a/test/langtools/tools/javac/classfiles/attributes/SourceFile/LocalClassTest.java
+++ b/test/langtools/tools/javac/classfiles/attributes/SourceFile/LocalClassTest.java
@@ -26,7 +26,6 @@
* @summary sourcefile attribute test for local class.
* @bug 8040129
* @library /tools/lib /tools/javac/lib ../lib
- * @enablePreview
* @modules jdk.compiler/com.sun.tools.javac.api
* jdk.compiler/com.sun.tools.javac.main
* java.base/jdk.internal.classfile.impl
diff --git a/test/langtools/tools/javac/classfiles/attributes/SourceFile/MixTest.java b/test/langtools/tools/javac/classfiles/attributes/SourceFile/MixTest.java
index 1c7aae4ae0f..d2079bb13f9 100644
--- a/test/langtools/tools/javac/classfiles/attributes/SourceFile/MixTest.java
+++ b/test/langtools/tools/javac/classfiles/attributes/SourceFile/MixTest.java
@@ -26,7 +26,6 @@
* @summary sourcefile attribute test for complex structure of nested classes and other types.
* @bug 8040129
* @library /tools/lib /tools/javac/lib ../lib
- * @enablePreview
* @modules jdk.compiler/com.sun.tools.javac.api
* jdk.compiler/com.sun.tools.javac.main
* java.base/jdk.internal.classfile.impl
diff --git a/test/langtools/tools/javac/classfiles/attributes/SourceFile/ModuleInfoTest.java b/test/langtools/tools/javac/classfiles/attributes/SourceFile/ModuleInfoTest.java
index 886ee032ed2..d0b65e41cfe 100644
--- a/test/langtools/tools/javac/classfiles/attributes/SourceFile/ModuleInfoTest.java
+++ b/test/langtools/tools/javac/classfiles/attributes/SourceFile/ModuleInfoTest.java
@@ -26,7 +26,6 @@
* @summary sourcefile attribute test for module-info.
* @bug 8080878
* @library /tools/lib /tools/javac/lib ../lib
- * @enablePreview
* @modules jdk.compiler/com.sun.tools.javac.api
* jdk.compiler/com.sun.tools.javac.main
* java.base/jdk.internal.classfile.impl
diff --git a/test/langtools/tools/javac/classfiles/attributes/SourceFile/NoSourceFileAttribute.java b/test/langtools/tools/javac/classfiles/attributes/SourceFile/NoSourceFileAttribute.java
index d4a4972f135..4e4b2faacd2 100644
--- a/test/langtools/tools/javac/classfiles/attributes/SourceFile/NoSourceFileAttribute.java
+++ b/test/langtools/tools/javac/classfiles/attributes/SourceFile/NoSourceFileAttribute.java
@@ -26,7 +26,6 @@
* @summary sourcefile attribute test for file compiled without debug information.
* @bug 8040129
* @library /tools/lib /tools/javac/lib ../lib
- * @enablePreview
* @modules jdk.compiler/com.sun.tools.javac.api
* jdk.compiler/com.sun.tools.javac.main
* java.base/jdk.internal.classfile.impl
diff --git a/test/langtools/tools/javac/classfiles/attributes/SourceFile/SyntheticClassTest.java b/test/langtools/tools/javac/classfiles/attributes/SourceFile/SyntheticClassTest.java
index 33f55545d81..07885640f8a 100644
--- a/test/langtools/tools/javac/classfiles/attributes/SourceFile/SyntheticClassTest.java
+++ b/test/langtools/tools/javac/classfiles/attributes/SourceFile/SyntheticClassTest.java
@@ -30,7 +30,6 @@
* jdk.compiler/com.sun.tools.javac.main
* java.base/jdk.internal.classfile.impl
* @build toolbox.ToolBox InMemoryFileManager TestBase SourceFileTestBase
- * @enablePreview
* @run main SyntheticClassTest
*/
diff --git a/test/langtools/tools/javac/classfiles/attributes/SourceFile/TopLevelClassesOneFileTest.java b/test/langtools/tools/javac/classfiles/attributes/SourceFile/TopLevelClassesOneFileTest.java
index d29d2ef9600..ee85b2dc650 100644
--- a/test/langtools/tools/javac/classfiles/attributes/SourceFile/TopLevelClassesOneFileTest.java
+++ b/test/langtools/tools/javac/classfiles/attributes/SourceFile/TopLevelClassesOneFileTest.java
@@ -26,7 +26,6 @@
* @summary sourcefile attribute test for two type in one file.
* @bug 8040129
* @library /tools/lib /tools/javac/lib ../lib
- * @enablePreview
* @modules jdk.compiler/com.sun.tools.javac.api
* jdk.compiler/com.sun.tools.javac.main
* java.base/jdk.internal.classfile.impl
diff --git a/test/langtools/tools/javac/classfiles/attributes/Synthetic/AccessToPrivateInnerClassConstructorsTest.java b/test/langtools/tools/javac/classfiles/attributes/Synthetic/AccessToPrivateInnerClassConstructorsTest.java
index 1c220441d8d..3072b641b69 100644
--- a/test/langtools/tools/javac/classfiles/attributes/Synthetic/AccessToPrivateInnerClassConstructorsTest.java
+++ b/test/langtools/tools/javac/classfiles/attributes/Synthetic/AccessToPrivateInnerClassConstructorsTest.java
@@ -25,10 +25,8 @@
* @test
* @bug 8189335
* @summary Synthetic anonymous class used as access constructor tag conflicting with a top level class.
- * @enablePreview
* @modules jdk.compiler/com.sun.tools.javac.api
* jdk.compiler/com.sun.tools.javac.main
- * java.base/jdk.internal.classfile.impl
* @library /tools/lib /tools/javac/lib ../lib
* @build toolbox.ToolBox InMemoryFileManager TestResult
* @build AccessToPrivateInnerClassConstructorsTest SyntheticTestDriver ExpectedClass ExpectedClasses
diff --git a/test/langtools/tools/javac/classfiles/attributes/Synthetic/AccessToPrivateInnerClassMembersTest.java b/test/langtools/tools/javac/classfiles/attributes/Synthetic/AccessToPrivateInnerClassMembersTest.java
index 3eef2e12ba7..0440ec1a430 100644
--- a/test/langtools/tools/javac/classfiles/attributes/Synthetic/AccessToPrivateInnerClassMembersTest.java
+++ b/test/langtools/tools/javac/classfiles/attributes/Synthetic/AccessToPrivateInnerClassMembersTest.java
@@ -26,10 +26,8 @@
* @bug 8044537
* @summary Checking ACC_SYNTHETIC flag is generated for access method
* generated to access to private methods and fields.
- * @enablePreview
* @modules jdk.compiler/com.sun.tools.javac.api
* jdk.compiler/com.sun.tools.javac.main
- * java.base/jdk.internal.classfile.impl
* @library /tools/lib /tools/javac/lib ../lib
* @build toolbox.ToolBox InMemoryFileManager TestResult
* @build AccessToPrivateInnerClassMembersTest SyntheticTestDriver ExpectedClass ExpectedClasses
diff --git a/test/langtools/tools/javac/classfiles/attributes/Synthetic/AccessToPrivateSiblingsTest.java b/test/langtools/tools/javac/classfiles/attributes/Synthetic/AccessToPrivateSiblingsTest.java
index 94f4af3a1e2..720af8507a8 100644
--- a/test/langtools/tools/javac/classfiles/attributes/Synthetic/AccessToPrivateSiblingsTest.java
+++ b/test/langtools/tools/javac/classfiles/attributes/Synthetic/AccessToPrivateSiblingsTest.java
@@ -26,10 +26,8 @@
* @bug 8044537
* @summary Checking ACC_SYNTHETIC flag is generated for access method
* generated to access to private methods and fields.
- * @enablePreview
* @modules jdk.compiler/com.sun.tools.javac.api
* jdk.compiler/com.sun.tools.javac.main
- * java.base/jdk.internal.classfile.impl
* @library /tools/lib /tools/javac/lib ../lib
* @build toolbox.ToolBox InMemoryFileManager TestResult TestBase
* @build AccessToPrivateSiblingsTest SyntheticTestDriver ExpectedClass ExpectedClasses
diff --git a/test/langtools/tools/javac/classfiles/attributes/Synthetic/AssertFieldTest.java b/test/langtools/tools/javac/classfiles/attributes/Synthetic/AssertFieldTest.java
index 8015177ff14..508bf245c47 100644
--- a/test/langtools/tools/javac/classfiles/attributes/Synthetic/AssertFieldTest.java
+++ b/test/langtools/tools/javac/classfiles/attributes/Synthetic/AssertFieldTest.java
@@ -25,10 +25,8 @@
* @test
* @bug 8044537
* @summary Checking ACC_SYNTHETIC flag is generated for assert statement.
- * @enablePreview
* @modules jdk.compiler/com.sun.tools.javac.api
* jdk.compiler/com.sun.tools.javac.main
- * java.base/jdk.internal.classfile.impl
* @library /tools/lib /tools/javac/lib ../lib
* @build toolbox.ToolBox InMemoryFileManager TestResult TestBase
* @build AssertFieldTest SyntheticTestDriver ExpectedClass ExpectedClasses
diff --git a/test/langtools/tools/javac/classfiles/attributes/Synthetic/BridgeMethodForGenericMethodTest.java b/test/langtools/tools/javac/classfiles/attributes/Synthetic/BridgeMethodForGenericMethodTest.java
index fedcf817ee3..96c7a41fea9 100644
--- a/test/langtools/tools/javac/classfiles/attributes/Synthetic/BridgeMethodForGenericMethodTest.java
+++ b/test/langtools/tools/javac/classfiles/attributes/Synthetic/BridgeMethodForGenericMethodTest.java
@@ -25,10 +25,8 @@
* @test
* @bug 8044537
* @summary Checking ACC_SYNTHETIC flag is generated for bridge method generated for generic method.
- * @enablePreview
* @modules jdk.compiler/com.sun.tools.javac.api
* jdk.compiler/com.sun.tools.javac.main
- * java.base/jdk.internal.classfile.impl
* @library /tools/lib /tools/javac/lib ../lib
* @build toolbox.ToolBox InMemoryFileManager TestResult TestBase
* @build BridgeMethodForGenericMethodTest SyntheticTestDriver ExpectedClass ExpectedClasses
diff --git a/test/langtools/tools/javac/classfiles/attributes/Synthetic/BridgeMethodsForLambdaTargetRelease14Test.java b/test/langtools/tools/javac/classfiles/attributes/Synthetic/BridgeMethodsForLambdaTargetRelease14Test.java
index e4dfb5000f5..db123295f7c 100644
--- a/test/langtools/tools/javac/classfiles/attributes/Synthetic/BridgeMethodsForLambdaTargetRelease14Test.java
+++ b/test/langtools/tools/javac/classfiles/attributes/Synthetic/BridgeMethodsForLambdaTargetRelease14Test.java
@@ -32,11 +32,10 @@
* @library /tools/lib /tools/javac/lib ../lib
* @build toolbox.ToolBox InMemoryFileManager
* ExpectedClass ExpectedClasses
- * @compile --enable-preview --source ${jdk.version} --target ${jdk.version}
- * SyntheticTestDriver.java
+ * @compile SyntheticTestDriver.java
* ../lib/TestResult.java ../lib/TestBase.java
* @compile --source 14 -target 14 -XDdeduplicateLambdas=false BridgeMethodsForLambdaTargetRelease14Test.java
- * @run main/othervm --enable-preview SyntheticTestDriver BridgeMethodsForLambdaTargetRelease14Test
+ * @run main SyntheticTestDriver BridgeMethodsForLambdaTargetRelease14Test
*/
import java.util.Comparator;
diff --git a/test/langtools/tools/javac/classfiles/attributes/Synthetic/BridgeMethodsForLambdaTest.java b/test/langtools/tools/javac/classfiles/attributes/Synthetic/BridgeMethodsForLambdaTest.java
index 10d93dd7631..5d26990d23d 100644
--- a/test/langtools/tools/javac/classfiles/attributes/Synthetic/BridgeMethodsForLambdaTest.java
+++ b/test/langtools/tools/javac/classfiles/attributes/Synthetic/BridgeMethodsForLambdaTest.java
@@ -26,10 +26,8 @@
* @bug 8044537 8200301 8238358
* @summary Checking ACC_SYNTHETIC flag is generated for bridge method
* generated for lambda expressions and method references.
- * @enablePreview
* @modules jdk.compiler/com.sun.tools.javac.api
* jdk.compiler/com.sun.tools.javac.main
- * java.base/jdk.internal.classfile.impl
* @library /tools/lib /tools/javac/lib ../lib
* @build toolbox.ToolBox InMemoryFileManager TestResult TestBase
* @build SyntheticTestDriver ExpectedClass ExpectedClasses
diff --git a/test/langtools/tools/javac/classfiles/attributes/Synthetic/EnumTest.java b/test/langtools/tools/javac/classfiles/attributes/Synthetic/EnumTest.java
index 891f09ae083..d4cfbbe8d19 100644
--- a/test/langtools/tools/javac/classfiles/attributes/Synthetic/EnumTest.java
+++ b/test/langtools/tools/javac/classfiles/attributes/Synthetic/EnumTest.java
@@ -25,10 +25,8 @@
* @test
* @bug 8044537
* @summary Checking ACC_SYNTHETIC flag is generated for enum members.
- * @enablePreview
* @modules jdk.compiler/com.sun.tools.javac.api
* jdk.compiler/com.sun.tools.javac.main
- * java.base/jdk.internal.classfile.impl
* @library /tools/lib /tools/javac/lib ../lib
* @build toolbox.ToolBox InMemoryFileManager TestResult TestBase
* @build EnumTest SyntheticTestDriver ExpectedClass ExpectedClasses
diff --git a/test/langtools/tools/javac/classfiles/attributes/Synthetic/PackageInfoTest.java b/test/langtools/tools/javac/classfiles/attributes/Synthetic/PackageInfoTest.java
index 108a9a16450..18a3c966546 100644
--- a/test/langtools/tools/javac/classfiles/attributes/Synthetic/PackageInfoTest.java
+++ b/test/langtools/tools/javac/classfiles/attributes/Synthetic/PackageInfoTest.java
@@ -25,10 +25,8 @@
* @test
* @bug 8044537
* @summary Checking ACC_SYNTHETIC flag is generated for package-info.
- * @enablePreview
* @modules jdk.compiler/com.sun.tools.javac.api
* jdk.compiler/com.sun.tools.javac.main
- * java.base/jdk.internal.classfile.impl
* @library /tools/lib /tools/javac/lib ../lib
* @build toolbox.ToolBox InMemoryFileManager TestResult TestBase
* @build SyntheticTestDriver ExpectedClass ExpectedClasses
diff --git a/test/langtools/tools/javac/classfiles/attributes/Synthetic/ThisFieldTest.java b/test/langtools/tools/javac/classfiles/attributes/Synthetic/ThisFieldTest.java
index ed87191d9c0..7c07628afbd 100644
--- a/test/langtools/tools/javac/classfiles/attributes/Synthetic/ThisFieldTest.java
+++ b/test/langtools/tools/javac/classfiles/attributes/Synthetic/ThisFieldTest.java
@@ -25,10 +25,8 @@
* @test
* @bug 8044537
* @summary Checking ACC_SYNTHETIC flag is generated for "this$0" field.
- * @enablePreview
* @modules jdk.compiler/com.sun.tools.javac.api
* jdk.compiler/com.sun.tools.javac.main
- * java.base/jdk.internal.classfile.impl
* @library /tools/lib /tools/javac/lib ../lib
* @build toolbox.ToolBox InMemoryFileManager TestResult TestBase
* @build ThisFieldTest SyntheticTestDriver ExpectedClass ExpectedClasses
diff --git a/test/langtools/tools/javac/classfiles/attributes/annotations/RuntimeAnnotationsForGenericMethodTest.java b/test/langtools/tools/javac/classfiles/attributes/annotations/RuntimeAnnotationsForGenericMethodTest.java
index 04bf7820b12..7691bc54ba7 100644
--- a/test/langtools/tools/javac/classfiles/attributes/annotations/RuntimeAnnotationsForGenericMethodTest.java
+++ b/test/langtools/tools/javac/classfiles/attributes/annotations/RuntimeAnnotationsForGenericMethodTest.java
@@ -26,9 +26,7 @@
* @bug 8044411
* @summary Tests the RuntimeVisibleAnnotations/RuntimeInvisibleAnnotations attribute.
* Checks that the attribute is generated for bridge method.
- * @enablePreview
- * @modules java.base/jdk.internal.classfile.impl
- * jdk.compiler/com.sun.tools.javac.api
+ * @modules jdk.compiler/com.sun.tools.javac.api
* jdk.compiler/com.sun.tools.javac.main
* @library /tools/lib /tools/javac/lib ../lib
* @build toolbox.ToolBox InMemoryFileManager TestResult TestBase
diff --git a/test/langtools/tools/javac/classfiles/attributes/annotations/RuntimeAnnotationsForInnerAnnotationTest.java b/test/langtools/tools/javac/classfiles/attributes/annotations/RuntimeAnnotationsForInnerAnnotationTest.java
index ac8069b2a76..c0ca6d2426d 100644
--- a/test/langtools/tools/javac/classfiles/attributes/annotations/RuntimeAnnotationsForInnerAnnotationTest.java
+++ b/test/langtools/tools/javac/classfiles/attributes/annotations/RuntimeAnnotationsForInnerAnnotationTest.java
@@ -25,9 +25,7 @@
* @test
* @bug 8044411
* @summary Tests the RuntimeVisibleAnnotations/RuntimeInvisibleAnnotations attribute.
- * @enablePreview
- * @modules java.base/jdk.internal.classfile.impl
- * jdk.compiler/com.sun.tools.javac.api
+ * @modules jdk.compiler/com.sun.tools.javac.api
* jdk.compiler/com.sun.tools.javac.main
* @library /tools/lib /tools/javac/lib ../lib
* @build toolbox.ToolBox InMemoryFileManager TestResult TestBase
diff --git a/test/langtools/tools/javac/classfiles/attributes/annotations/RuntimeAnnotationsForInnerClassTest.java b/test/langtools/tools/javac/classfiles/attributes/annotations/RuntimeAnnotationsForInnerClassTest.java
index 2ad55bea369..8fc1aadb276 100644
--- a/test/langtools/tools/javac/classfiles/attributes/annotations/RuntimeAnnotationsForInnerClassTest.java
+++ b/test/langtools/tools/javac/classfiles/attributes/annotations/RuntimeAnnotationsForInnerClassTest.java
@@ -25,9 +25,7 @@
* @test
* @bug 8044411
* @summary Tests the RuntimeVisibleAnnotations/RuntimeInvisibleAnnotations attribute.
- * @enablePreview
- * @modules java.base/jdk.internal.classfile.impl
- * jdk.compiler/com.sun.tools.javac.api
+ * @modules jdk.compiler/com.sun.tools.javac.api
* jdk.compiler/com.sun.tools.javac.main
* @library /tools/lib /tools/javac/lib ../lib
* @build toolbox.ToolBox InMemoryFileManager TestResult TestBase
diff --git a/test/langtools/tools/javac/classfiles/attributes/annotations/RuntimeAnnotationsForInnerEnumTest.java b/test/langtools/tools/javac/classfiles/attributes/annotations/RuntimeAnnotationsForInnerEnumTest.java
index c4ee74e8ee3..f699124dca9 100644
--- a/test/langtools/tools/javac/classfiles/attributes/annotations/RuntimeAnnotationsForInnerEnumTest.java
+++ b/test/langtools/tools/javac/classfiles/attributes/annotations/RuntimeAnnotationsForInnerEnumTest.java
@@ -25,9 +25,7 @@
* @test
* @bug 8044411
* @summary Tests the RuntimeVisibleAnnotations/RuntimeInvisibleAnnotations attribute.
- * @enablePreview
- * @modules java.base/jdk.internal.classfile.impl
- * jdk.compiler/com.sun.tools.javac.api
+ * @modules jdk.compiler/com.sun.tools.javac.api
* jdk.compiler/com.sun.tools.javac.main
* @library /tools/lib /tools/javac/lib ../lib
* @build toolbox.ToolBox InMemoryFileManager TestResult TestBase
diff --git a/test/langtools/tools/javac/classfiles/attributes/annotations/RuntimeAnnotationsForInnerInterfaceTest.java b/test/langtools/tools/javac/classfiles/attributes/annotations/RuntimeAnnotationsForInnerInterfaceTest.java
index 5d3bcc519ff..553155fa9f2 100644
--- a/test/langtools/tools/javac/classfiles/attributes/annotations/RuntimeAnnotationsForInnerInterfaceTest.java
+++ b/test/langtools/tools/javac/classfiles/attributes/annotations/RuntimeAnnotationsForInnerInterfaceTest.java
@@ -25,9 +25,7 @@
* @test
* @bug 8044411
* @summary Tests the RuntimeVisibleAnnotations/RuntimeInvisibleAnnotations attribute.
- * @enablePreview
- * @modules java.base/jdk.internal.classfile.impl
- * jdk.compiler/com.sun.tools.javac.api
+ * @modules jdk.compiler/com.sun.tools.javac.api
* jdk.compiler/com.sun.tools.javac.main
* @library /tools/lib /tools/javac/lib ../lib
* @build toolbox.ToolBox InMemoryFileManager TestResult TestBase
diff --git a/test/langtools/tools/javac/classfiles/attributes/annotations/RuntimeAnnotationsForTopLevelClassTest.java b/test/langtools/tools/javac/classfiles/attributes/annotations/RuntimeAnnotationsForTopLevelClassTest.java
index 948b8abfcec..6a80acd406e 100644
--- a/test/langtools/tools/javac/classfiles/attributes/annotations/RuntimeAnnotationsForTopLevelClassTest.java
+++ b/test/langtools/tools/javac/classfiles/attributes/annotations/RuntimeAnnotationsForTopLevelClassTest.java
@@ -25,9 +25,7 @@
* @test
* @bug 8044411
* @summary Tests the RuntimeVisibleAnnotations/RuntimeInvisibleAnnotations attribute.
- * @enablePreview
- * @modules java.base/jdk.internal.classfile.impl
- * jdk.compiler/com.sun.tools.javac.api
+ * @modules jdk.compiler/com.sun.tools.javac.api
* jdk.compiler/com.sun.tools.javac.main
* @library /tools/lib /tools/javac/lib ../lib
* @build toolbox.ToolBox InMemoryFileManager TestResult TestBase
diff --git a/test/langtools/tools/javac/classfiles/attributes/annotations/RuntimeParameterAnnotationsForGenericMethodTest.java b/test/langtools/tools/javac/classfiles/attributes/annotations/RuntimeParameterAnnotationsForGenericMethodTest.java
index 2846325dd4a..6e0671c2b23 100644
--- a/test/langtools/tools/javac/classfiles/attributes/annotations/RuntimeParameterAnnotationsForGenericMethodTest.java
+++ b/test/langtools/tools/javac/classfiles/attributes/annotations/RuntimeParameterAnnotationsForGenericMethodTest.java
@@ -26,9 +26,7 @@
* @bug 8044411
* @summary Tests the RuntimeParameterVisibleAnnotations/RuntimeParameterInvisibleAnnotations attribute.
* Checks that the attribute is generated for bridge method.
- * @enablePreview
- * @modules java.base/jdk.internal.classfile.impl
- * jdk.compiler/com.sun.tools.javac.api
+ * @modules jdk.compiler/com.sun.tools.javac.api
* jdk.compiler/com.sun.tools.javac.main
* @library /tools/lib /tools/javac/lib ../lib
* @build toolbox.ToolBox InMemoryFileManager TestResult TestBase
diff --git a/test/langtools/tools/javac/classfiles/attributes/annotations/RuntimeParameterAnnotationsForLambdaTest.java b/test/langtools/tools/javac/classfiles/attributes/annotations/RuntimeParameterAnnotationsForLambdaTest.java
index ef9bd07cd69..c40ac214bd7 100644
--- a/test/langtools/tools/javac/classfiles/attributes/annotations/RuntimeParameterAnnotationsForLambdaTest.java
+++ b/test/langtools/tools/javac/classfiles/attributes/annotations/RuntimeParameterAnnotationsForLambdaTest.java
@@ -25,9 +25,7 @@
* @test
* @bug 8044411 8079060 8138612
* @summary Tests the RuntimeParameterVisibleAnnotations/RuntimeParameterInvisibleAnnotations attribute.
- * @enablePreview
- * @modules java.base/jdk.internal.classfile.impl
- * jdk.compiler/com.sun.tools.javac.api
+ * @modules jdk.compiler/com.sun.tools.javac.api
* jdk.compiler/com.sun.tools.javac.main
* @library /tools/lib /tools/javac/lib ../lib
* @build toolbox.ToolBox InMemoryFileManager TestResult TestBase
diff --git a/test/langtools/tools/javac/classfiles/attributes/annotations/RuntimeParameterAnnotationsTest.java b/test/langtools/tools/javac/classfiles/attributes/annotations/RuntimeParameterAnnotationsTest.java
index a62c3a1d989..9443ccc5151 100644
--- a/test/langtools/tools/javac/classfiles/attributes/annotations/RuntimeParameterAnnotationsTest.java
+++ b/test/langtools/tools/javac/classfiles/attributes/annotations/RuntimeParameterAnnotationsTest.java
@@ -25,9 +25,7 @@
* @test
* @bug 8044411
* @summary Tests the RuntimeParameterVisibleAnnotations/RuntimeParameterInvisibleAnnotations attribute.
- * @enablePreview
- * @modules java.base/jdk.internal.classfile.impl
- * jdk.compiler/com.sun.tools.javac.api
+ * @modules jdk.compiler/com.sun.tools.javac.api
* jdk.compiler/com.sun.tools.javac.main
* @library /tools/lib /tools/javac/lib ../lib
* @build toolbox.ToolBox InMemoryFileManager TestResult TestBase
diff --git a/test/langtools/tools/javac/classfiles/attributes/deprecated/DeprecatedPackageTest.java b/test/langtools/tools/javac/classfiles/attributes/deprecated/DeprecatedPackageTest.java
index b3e7339b240..d2b8c56207f 100644
--- a/test/langtools/tools/javac/classfiles/attributes/deprecated/DeprecatedPackageTest.java
+++ b/test/langtools/tools/javac/classfiles/attributes/deprecated/DeprecatedPackageTest.java
@@ -26,11 +26,9 @@
* @bug 8042261 8298405
* @summary Checking that deprecated attribute does not apply to classes of deprecated package.
* @library /tools/lib /tools/javac/lib ../lib
- * @enablePreview
* @modules jdk.compiler/com.sun.tools.javac.api
* jdk.compiler/com.sun.tools.javac.main
* jdk.compiler/com.sun.tools.javac.util
- * java.base/jdk.internal.classfile.impl
* @build toolbox.ToolBox InMemoryFileManager TestResult TestBase
* @run main DeprecatedPackageTest
*/
diff --git a/test/langtools/tools/javac/classfiles/attributes/deprecated/DeprecatedTest.java b/test/langtools/tools/javac/classfiles/attributes/deprecated/DeprecatedTest.java
index 6467f3d8027..9a83cb2a920 100644
--- a/test/langtools/tools/javac/classfiles/attributes/deprecated/DeprecatedTest.java
+++ b/test/langtools/tools/javac/classfiles/attributes/deprecated/DeprecatedTest.java
@@ -27,7 +27,6 @@
* @summary Checking what attribute is generated by annotation Deprecated
* or javadoc deprecated for field, method, class(inner/local), interface.
* @library /tools/lib /tools/javac/lib ../lib
- * @enablePreview
* @modules jdk.compiler/com.sun.tools.javac.api
* jdk.compiler/com.sun.tools.javac.main
* jdk.compiler/com.sun.tools.javac.util
diff --git a/test/langtools/tools/javac/classfiles/attributes/innerclasses/InnerAnnotationsInInnerAnnotationTest.java b/test/langtools/tools/javac/classfiles/attributes/innerclasses/InnerAnnotationsInInnerAnnotationTest.java
index a07a111f024..a7d84a4a599 100644
--- a/test/langtools/tools/javac/classfiles/attributes/innerclasses/InnerAnnotationsInInnerAnnotationTest.java
+++ b/test/langtools/tools/javac/classfiles/attributes/innerclasses/InnerAnnotationsInInnerAnnotationTest.java
@@ -26,7 +26,6 @@
* @bug 8042251
* @summary Testing InnerClasses_attribute of inner annotations in inner annotation.
* @library /tools/lib /tools/javac/lib ../lib
- * @enablePreview
* @modules jdk.compiler/com.sun.tools.javac.api
* jdk.compiler/com.sun.tools.javac.main
* java.base/jdk.internal.classfile.impl
diff --git a/test/langtools/tools/javac/classfiles/attributes/innerclasses/InnerAnnotationsInInnerClassTest.java b/test/langtools/tools/javac/classfiles/attributes/innerclasses/InnerAnnotationsInInnerClassTest.java
index f02da8d302a..cdf2413eeec 100644
--- a/test/langtools/tools/javac/classfiles/attributes/innerclasses/InnerAnnotationsInInnerClassTest.java
+++ b/test/langtools/tools/javac/classfiles/attributes/innerclasses/InnerAnnotationsInInnerClassTest.java
@@ -26,7 +26,6 @@
* @bug 8042251
* @summary Testing InnerClasses_attribute of inner annotations in inner class.
* @library /tools/lib /tools/javac/lib ../lib
- * @enablePreview
* @modules jdk.compiler/com.sun.tools.javac.api
* jdk.compiler/com.sun.tools.javac.main
* java.base/jdk.internal.classfile.impl
diff --git a/test/langtools/tools/javac/classfiles/attributes/innerclasses/InnerAnnotationsInInnerEnumTest.java b/test/langtools/tools/javac/classfiles/attributes/innerclasses/InnerAnnotationsInInnerEnumTest.java
index 06ccbdf0725..1b78cbeccec 100644
--- a/test/langtools/tools/javac/classfiles/attributes/innerclasses/InnerAnnotationsInInnerEnumTest.java
+++ b/test/langtools/tools/javac/classfiles/attributes/innerclasses/InnerAnnotationsInInnerEnumTest.java
@@ -26,7 +26,6 @@
* @bug 8042251
* @summary Testing InnerClasses_attribute of inner annotations in inner enum.
* @library /tools/lib /tools/javac/lib ../lib
- * @enablePreview
* @modules jdk.compiler/com.sun.tools.javac.api
* jdk.compiler/com.sun.tools.javac.main
* java.base/jdk.internal.classfile.impl
diff --git a/test/langtools/tools/javac/classfiles/attributes/innerclasses/InnerAnnotationsInInnerInterfaceTest.java b/test/langtools/tools/javac/classfiles/attributes/innerclasses/InnerAnnotationsInInnerInterfaceTest.java
index 7fd6c7bd259..c40b7161d6d 100644
--- a/test/langtools/tools/javac/classfiles/attributes/innerclasses/InnerAnnotationsInInnerInterfaceTest.java
+++ b/test/langtools/tools/javac/classfiles/attributes/innerclasses/InnerAnnotationsInInnerInterfaceTest.java
@@ -26,7 +26,6 @@
* @bug 8042251
* @summary Testing InnerClasses_attribute of inner annotations in inner interface.
* @library /tools/lib /tools/javac/lib ../lib
- * @enablePreview
* @modules jdk.compiler/com.sun.tools.javac.api
* jdk.compiler/com.sun.tools.javac.main
* java.base/jdk.internal.classfile.impl
diff --git a/test/langtools/tools/javac/classfiles/attributes/innerclasses/InnerClassesHierarchyTest.java b/test/langtools/tools/javac/classfiles/attributes/innerclasses/InnerClassesHierarchyTest.java
index 124f46acded..a6210b8455a 100644
--- a/test/langtools/tools/javac/classfiles/attributes/innerclasses/InnerClassesHierarchyTest.java
+++ b/test/langtools/tools/javac/classfiles/attributes/innerclasses/InnerClassesHierarchyTest.java
@@ -26,10 +26,8 @@
* @bug 8042251
* @summary Test that inner classes have in its inner classes attribute enclosing classes and its immediate members.
* @library /tools/lib /tools/javac/lib ../lib
- * @enablePreview
* @modules jdk.compiler/com.sun.tools.javac.api
* jdk.compiler/com.sun.tools.javac.main
- * java.base/jdk.internal.classfile.impl
* @build toolbox.ToolBox InMemoryFileManager TestResult TestBase
* @run main InnerClassesHierarchyTest
*/
diff --git a/test/langtools/tools/javac/classfiles/attributes/innerclasses/InnerClassesInAnonymousClassTest.java b/test/langtools/tools/javac/classfiles/attributes/innerclasses/InnerClassesInAnonymousClassTest.java
index 45554408974..fb6003752f6 100644
--- a/test/langtools/tools/javac/classfiles/attributes/innerclasses/InnerClassesInAnonymousClassTest.java
+++ b/test/langtools/tools/javac/classfiles/attributes/innerclasses/InnerClassesInAnonymousClassTest.java
@@ -26,7 +26,6 @@
* @bug 8042251 8062373
* @summary Testing InnerClasses_attribute of inner classes in anonymous class.
* @library /tools/lib /tools/javac/lib ../lib
- * @enablePreview
* @modules jdk.compiler/com.sun.tools.javac.api
* jdk.compiler/com.sun.tools.javac.main
* java.base/jdk.internal.classfile.impl
diff --git a/test/langtools/tools/javac/classfiles/attributes/innerclasses/InnerClassesInInnerAnnotationTest.java b/test/langtools/tools/javac/classfiles/attributes/innerclasses/InnerClassesInInnerAnnotationTest.java
index 9b7be560ed4..f69b0d1a885 100644
--- a/test/langtools/tools/javac/classfiles/attributes/innerclasses/InnerClassesInInnerAnnotationTest.java
+++ b/test/langtools/tools/javac/classfiles/attributes/innerclasses/InnerClassesInInnerAnnotationTest.java
@@ -26,7 +26,6 @@
* @bug 8042251
* @summary Testing InnerClasses_attribute of inner classes in inner annotation.
* @library /tools/lib /tools/javac/lib ../lib
- * @enablePreview
* @modules jdk.compiler/com.sun.tools.javac.api
* jdk.compiler/com.sun.tools.javac.main
* java.base/jdk.internal.classfile.impl
diff --git a/test/langtools/tools/javac/classfiles/attributes/innerclasses/InnerClassesInInnerClassTest.java b/test/langtools/tools/javac/classfiles/attributes/innerclasses/InnerClassesInInnerClassTest.java
index df638c9cd91..bd5d27e7307 100644
--- a/test/langtools/tools/javac/classfiles/attributes/innerclasses/InnerClassesInInnerClassTest.java
+++ b/test/langtools/tools/javac/classfiles/attributes/innerclasses/InnerClassesInInnerClassTest.java
@@ -26,7 +26,6 @@
* @bug 8034854 8042251
* @summary Testing InnerClasses_attribute of inner classes in inner class.
* @library /tools/lib /tools/javac/lib ../lib
- * @enablePreview
* @modules jdk.compiler/com.sun.tools.javac.api
* jdk.compiler/com.sun.tools.javac.main
* java.base/jdk.internal.classfile.impl
diff --git a/test/langtools/tools/javac/classfiles/attributes/innerclasses/InnerClassesInInnerEnumTest.java b/test/langtools/tools/javac/classfiles/attributes/innerclasses/InnerClassesInInnerEnumTest.java
index 9ff973177ab..7bca5b5240f 100644
--- a/test/langtools/tools/javac/classfiles/attributes/innerclasses/InnerClassesInInnerEnumTest.java
+++ b/test/langtools/tools/javac/classfiles/attributes/innerclasses/InnerClassesInInnerEnumTest.java
@@ -26,7 +26,6 @@
* @bug 8034854 8042251
* @summary Testing InnerClasses_attribute of inner classes in inner enum.
* @library /tools/lib /tools/javac/lib ../lib
- * @enablePreview
* @modules jdk.compiler/com.sun.tools.javac.api
* jdk.compiler/com.sun.tools.javac.main
* java.base/jdk.internal.classfile.impl
diff --git a/test/langtools/tools/javac/classfiles/attributes/innerclasses/InnerClassesInInnerInterfaceTest.java b/test/langtools/tools/javac/classfiles/attributes/innerclasses/InnerClassesInInnerInterfaceTest.java
index 722c1f4951a..3e6d32044cb 100644
--- a/test/langtools/tools/javac/classfiles/attributes/innerclasses/InnerClassesInInnerInterfaceTest.java
+++ b/test/langtools/tools/javac/classfiles/attributes/innerclasses/InnerClassesInInnerInterfaceTest.java
@@ -26,7 +26,6 @@
* @bug 8042251
* @summary Testing InnerClasses_attribute of inner classes in inner interface.
* @library /tools/lib /tools/javac/lib ../lib
- * @enablePreview
* @modules jdk.compiler/com.sun.tools.javac.api
* jdk.compiler/com.sun.tools.javac.main
* java.base/jdk.internal.classfile.impl
diff --git a/test/langtools/tools/javac/classfiles/attributes/innerclasses/InnerClassesInLocalClassTest.java b/test/langtools/tools/javac/classfiles/attributes/innerclasses/InnerClassesInLocalClassTest.java
index bf5488f60b5..a2409c810d1 100644
--- a/test/langtools/tools/javac/classfiles/attributes/innerclasses/InnerClassesInLocalClassTest.java
+++ b/test/langtools/tools/javac/classfiles/attributes/innerclasses/InnerClassesInLocalClassTest.java
@@ -26,7 +26,6 @@
* @bug 8042251
* @summary Testing InnerClasses_attribute of inner classes in local class.
* @library /tools/lib /tools/javac/lib ../lib
- * @enablePreview
* @modules java.base/jdk.internal.classfile.impl
* jdk.compiler/com.sun.tools.javac.api
* jdk.compiler/com.sun.tools.javac.main
diff --git a/test/langtools/tools/javac/classfiles/attributes/innerclasses/InnerClassesIndexTest.java b/test/langtools/tools/javac/classfiles/attributes/innerclasses/InnerClassesIndexTest.java
index 96f2efc6ea6..d8b78622185 100644
--- a/test/langtools/tools/javac/classfiles/attributes/innerclasses/InnerClassesIndexTest.java
+++ b/test/langtools/tools/javac/classfiles/attributes/innerclasses/InnerClassesIndexTest.java
@@ -26,10 +26,8 @@
* @bug 8042251
* @summary Test that outer_class_info_index of local and anonymous class is zero.
* @library /tools/lib /tools/javac/lib ../lib
- * @enablePreview
* @modules jdk.compiler/com.sun.tools.javac.api
* jdk.compiler/com.sun.tools.javac.main
- * java.base/jdk.internal.classfile.impl
* @build toolbox.ToolBox InMemoryFileManager TestResult TestBase
* @run main InnerClassesIndexTest
*/
diff --git a/test/langtools/tools/javac/classfiles/attributes/innerclasses/InnerClassesTest.java b/test/langtools/tools/javac/classfiles/attributes/innerclasses/InnerClassesTest.java
index f2901d4c9cb..6225c89e591 100644
--- a/test/langtools/tools/javac/classfiles/attributes/innerclasses/InnerClassesTest.java
+++ b/test/langtools/tools/javac/classfiles/attributes/innerclasses/InnerClassesTest.java
@@ -26,7 +26,6 @@
* @bug 8034854 8042251
* @summary Testing inner classes attributes.
* @library /tools/lib /tools/javac/lib ../lib
- * @enablePreview
* @modules jdk.compiler/com.sun.tools.javac.api
* jdk.compiler/com.sun.tools.javac.main
* java.base/jdk.internal.classfile.impl
diff --git a/test/langtools/tools/javac/classfiles/attributes/innerclasses/InnerEnumInInnerAnnotationTest.java b/test/langtools/tools/javac/classfiles/attributes/innerclasses/InnerEnumInInnerAnnotationTest.java
index 41d9627b278..43aa1462ca6 100644
--- a/test/langtools/tools/javac/classfiles/attributes/innerclasses/InnerEnumInInnerAnnotationTest.java
+++ b/test/langtools/tools/javac/classfiles/attributes/innerclasses/InnerEnumInInnerAnnotationTest.java
@@ -26,7 +26,6 @@
* @bug 8042251
* @summary Testing InnerClasses_attribute of inner enums in inner annotation.
* @library /tools/lib /tools/javac/lib ../lib
- * @enablePreview
* @modules jdk.compiler/com.sun.tools.javac.api
* jdk.compiler/com.sun.tools.javac.main
* java.base/jdk.internal.classfile.impl
diff --git a/test/langtools/tools/javac/classfiles/attributes/innerclasses/InnerEnumInInnerEnumTest.java b/test/langtools/tools/javac/classfiles/attributes/innerclasses/InnerEnumInInnerEnumTest.java
index 3136cce327d..3c4775d22a7 100644
--- a/test/langtools/tools/javac/classfiles/attributes/innerclasses/InnerEnumInInnerEnumTest.java
+++ b/test/langtools/tools/javac/classfiles/attributes/innerclasses/InnerEnumInInnerEnumTest.java
@@ -26,7 +26,6 @@
* @bug 8042251
* @summary Testing InnerClasses_attribute of inner enums in inner enum.
* @library /tools/lib /tools/javac/lib ../lib
- * @enablePreview
* @modules jdk.compiler/com.sun.tools.javac.api
* jdk.compiler/com.sun.tools.javac.main
* java.base/jdk.internal.classfile.impl
diff --git a/test/langtools/tools/javac/classfiles/attributes/innerclasses/InnerEnumInInnerInterfaceTest.java b/test/langtools/tools/javac/classfiles/attributes/innerclasses/InnerEnumInInnerInterfaceTest.java
index 59d86c3f65a..01beace40ca 100644
--- a/test/langtools/tools/javac/classfiles/attributes/innerclasses/InnerEnumInInnerInterfaceTest.java
+++ b/test/langtools/tools/javac/classfiles/attributes/innerclasses/InnerEnumInInnerInterfaceTest.java
@@ -26,7 +26,6 @@
* @bug 8042251
* @summary Testing InnerClasses_attribute of inner enums in inner interface.
* @library /tools/lib /tools/javac/lib ../lib
- * @enablePreview
* @modules jdk.compiler/com.sun.tools.javac.api
* jdk.compiler/com.sun.tools.javac.main
* java.base/jdk.internal.classfile.impl
diff --git a/test/langtools/tools/javac/classfiles/attributes/innerclasses/InnerEnumsInInnerClassTest.java b/test/langtools/tools/javac/classfiles/attributes/innerclasses/InnerEnumsInInnerClassTest.java
index aeee14b8e90..413bee58f00 100644
--- a/test/langtools/tools/javac/classfiles/attributes/innerclasses/InnerEnumsInInnerClassTest.java
+++ b/test/langtools/tools/javac/classfiles/attributes/innerclasses/InnerEnumsInInnerClassTest.java
@@ -26,7 +26,6 @@
* @bug 8042251
* @summary Testing InnerClasses_attribute of inner enums in inner class.
* @library /tools/lib /tools/javac/lib ../lib
- * @enablePreview
* @modules jdk.compiler/com.sun.tools.javac.api
* jdk.compiler/com.sun.tools.javac.main
* java.base/jdk.internal.classfile.impl
diff --git a/test/langtools/tools/javac/classfiles/attributes/innerclasses/InnerInterfacesInInnerAnnotationTest.java b/test/langtools/tools/javac/classfiles/attributes/innerclasses/InnerInterfacesInInnerAnnotationTest.java
index 57f48bd6d3c..ca25c1028f6 100644
--- a/test/langtools/tools/javac/classfiles/attributes/innerclasses/InnerInterfacesInInnerAnnotationTest.java
+++ b/test/langtools/tools/javac/classfiles/attributes/innerclasses/InnerInterfacesInInnerAnnotationTest.java
@@ -26,7 +26,6 @@
* @bug 8042251
* @summary Testing InnerClasses_attribute of inner interfaces in inner annotation.
* @library /tools/lib /tools/javac/lib ../lib
- * @enablePreview
* @modules jdk.compiler/com.sun.tools.javac.api
* jdk.compiler/com.sun.tools.javac.main
* java.base/jdk.internal.classfile.impl
diff --git a/test/langtools/tools/javac/classfiles/attributes/innerclasses/InnerInterfacesInInnerClassTest.java b/test/langtools/tools/javac/classfiles/attributes/innerclasses/InnerInterfacesInInnerClassTest.java
index 522d6077602..c0dac827f81 100644
--- a/test/langtools/tools/javac/classfiles/attributes/innerclasses/InnerInterfacesInInnerClassTest.java
+++ b/test/langtools/tools/javac/classfiles/attributes/innerclasses/InnerInterfacesInInnerClassTest.java
@@ -26,7 +26,6 @@
* @summary Testing InnerClasses_attribute of inner interfaces in inner class.
* @author aeremeev
* @library /tools/lib /tools/javac/lib ../lib
- * @enablePreview
* @modules jdk.compiler/com.sun.tools.javac.api
* jdk.compiler/com.sun.tools.javac.main
* java.base/jdk.internal.classfile.impl
diff --git a/test/langtools/tools/javac/classfiles/attributes/innerclasses/InnerInterfacesInInnerEnumTest.java b/test/langtools/tools/javac/classfiles/attributes/innerclasses/InnerInterfacesInInnerEnumTest.java
index 53136291cfa..5e6051ddd75 100644
--- a/test/langtools/tools/javac/classfiles/attributes/innerclasses/InnerInterfacesInInnerEnumTest.java
+++ b/test/langtools/tools/javac/classfiles/attributes/innerclasses/InnerInterfacesInInnerEnumTest.java
@@ -26,7 +26,6 @@
* @bug 8042251
* @summary Testing InnerClasses_attribute of inner interfaces in inner enum.
* @library /tools/lib /tools/javac/lib ../lib
- * @enablePreview
* @modules jdk.compiler/com.sun.tools.javac.api
* jdk.compiler/com.sun.tools.javac.main
* java.base/jdk.internal.classfile.impl
diff --git a/test/langtools/tools/javac/classfiles/attributes/innerclasses/InnerInterfacesInInnerInterfaceTest.java b/test/langtools/tools/javac/classfiles/attributes/innerclasses/InnerInterfacesInInnerInterfaceTest.java
index 6f3ea9da4ed..abf8e5987d7 100644
--- a/test/langtools/tools/javac/classfiles/attributes/innerclasses/InnerInterfacesInInnerInterfaceTest.java
+++ b/test/langtools/tools/javac/classfiles/attributes/innerclasses/InnerInterfacesInInnerInterfaceTest.java
@@ -26,7 +26,6 @@
* @bug 8042251
* @summary Testing InnerClasses_attribute of inner interfaces in inner interface.
* @library /tools/lib /tools/javac/lib ../lib
- * @enablePreview
* @modules jdk.compiler/com.sun.tools.javac.api
* jdk.compiler/com.sun.tools.javac.main
* java.base/jdk.internal.classfile.impl
diff --git a/test/langtools/tools/javac/classfiles/attributes/innerclasses/NoInnerClassesTest.java b/test/langtools/tools/javac/classfiles/attributes/innerclasses/NoInnerClassesTest.java
index 35d65208bc5..e6f29a1d078 100644
--- a/test/langtools/tools/javac/classfiles/attributes/innerclasses/NoInnerClassesTest.java
+++ b/test/langtools/tools/javac/classfiles/attributes/innerclasses/NoInnerClassesTest.java
@@ -26,10 +26,8 @@
* @bug 8042251
* @summary Test that there are no inner classes attributes in case of there are no inner classes.
* @library /tools/lib /tools/javac/lib ../lib
- * @enablePreview
* @modules jdk.compiler/com.sun.tools.javac.api
* jdk.compiler/com.sun.tools.javac.main
- * java.base/jdk.internal.classfile.impl
* @build toolbox.ToolBox InMemoryFileManager TestBase
* @run main NoInnerClassesTest
*/
diff --git a/test/langtools/tools/javac/classreader/8171132/BadConstantValue.java b/test/langtools/tools/javac/classreader/8171132/BadConstantValue.java
index a44adbf6d9e..1523ac59f37 100644
--- a/test/langtools/tools/javac/classreader/8171132/BadConstantValue.java
+++ b/test/langtools/tools/javac/classreader/8171132/BadConstantValue.java
@@ -26,9 +26,7 @@
* @test
* @bug 8171132
* @summary Improve class reading of invalid or out-of-range ConstantValue attributes
- * @enablePreview
- * @modules java.base/jdk.internal.classfile.impl
- * jdk.compiler/com.sun.tools.javac.api
+ * @modules jdk.compiler/com.sun.tools.javac.api
* jdk.compiler/com.sun.tools.javac.code
* jdk.compiler/com.sun.tools.javac.jvm
* jdk.compiler/com.sun.tools.javac.main
diff --git a/test/langtools/tools/javac/classreader/BadMethodParameter.java b/test/langtools/tools/javac/classreader/BadMethodParameter.java
index cddd3f24956..56b93183abe 100644
--- a/test/langtools/tools/javac/classreader/BadMethodParameter.java
+++ b/test/langtools/tools/javac/classreader/BadMethodParameter.java
@@ -31,7 +31,6 @@
* jdk.compiler/com.sun.tools.javac.api
* jdk.compiler/com.sun.tools.javac.main
* @build toolbox.ToolBox toolbox.JavacTask
- * @enablePreview
* @run main BadMethodParameter
*/
@@ -99,9 +98,7 @@ public static void f(int x, int y) {
Path classDir = getClassDir();
new JavacTask(tb)
.classpath(classes, classDir)
- .options("--enable-preview",
- "-source", String.valueOf(Runtime.version().feature()),
- "-verbose", "-parameters", "-processor", P.class.getName())
+ .options("-verbose", "-parameters", "-processor", P.class.getName())
.classes(P.class.getName())
.outdir(classes)
.run(Task.Expect.SUCCESS);
diff --git a/test/langtools/tools/javac/classwriter/IndyCorrectInvocationName.java b/test/langtools/tools/javac/classwriter/IndyCorrectInvocationName.java
index 8b5e4e7b695..3a8be1f53ed 100644
--- a/test/langtools/tools/javac/classwriter/IndyCorrectInvocationName.java
+++ b/test/langtools/tools/javac/classwriter/IndyCorrectInvocationName.java
@@ -27,7 +27,6 @@
* @summary Verify the correct constantpool entries are created for invokedynamic instructions using
* the same bootstrap and type, but different name.
* @library /tools/lib
- * @enablePreview
* @modules jdk.compiler/com.sun.tools.javac.api
* jdk.compiler/com.sun.tools.javac.code
* jdk.compiler/com.sun.tools.javac.comp
@@ -35,7 +34,6 @@
* jdk.compiler/com.sun.tools.javac.main
* jdk.compiler/com.sun.tools.javac.tree
* jdk.compiler/com.sun.tools.javac.util
- * java.base/jdk.internal.classfile.impl
* jdk.jdeps/com.sun.tools.javap
* @build toolbox.JarTask toolbox.JavacTask toolbox.JavapTask toolbox.ToolBox
* @run main IndyCorrectInvocationName
diff --git a/test/langtools/tools/javac/code/CharImmediateValue.java b/test/langtools/tools/javac/code/CharImmediateValue.java
index 44e2744b74e..d96fb60a1b7 100644
--- a/test/langtools/tools/javac/code/CharImmediateValue.java
+++ b/test/langtools/tools/javac/code/CharImmediateValue.java
@@ -27,7 +27,6 @@
* @summary Verify constant/immediate char values are correctly enhanced to ints when used in unary
* operators
* @library /tools/lib
- * @enablePreview
* @modules jdk.compiler/com.sun.tools.javac.api
* jdk.compiler/com.sun.tools.javac.code
* jdk.compiler/com.sun.tools.javac.comp
@@ -35,7 +34,6 @@
* jdk.compiler/com.sun.tools.javac.main
* jdk.compiler/com.sun.tools.javac.tree
* jdk.compiler/com.sun.tools.javac.util
- * java.base/jdk.internal.classfile.impl
* jdk.jdeps/com.sun.tools.javap
* @build toolbox.JarTask toolbox.JavacTask toolbox.JavapTask toolbox.ToolBox
* @compile CharImmediateValue.java
diff --git a/test/langtools/tools/javac/constDebug/ConstDebugTest.java b/test/langtools/tools/javac/constDebug/ConstDebugTest.java
index 59a6e4daa24..c487ccea269 100644
--- a/test/langtools/tools/javac/constDebug/ConstDebugTest.java
+++ b/test/langtools/tools/javac/constDebug/ConstDebugTest.java
@@ -25,7 +25,6 @@
* @test
* @bug 4645152 4785453
* @summary javac compiler incorrectly inserts when -g is specified
- * @enablePreview
* @run compile -g ConstDebugTest.java
* @run main ConstDebugTest
*/
diff --git a/test/langtools/tools/javac/defaultMethods/BadClassfile.java b/test/langtools/tools/javac/defaultMethods/BadClassfile.java
index 589b65bcf66..ed952ea3799 100644
--- a/test/langtools/tools/javac/defaultMethods/BadClassfile.java
+++ b/test/langtools/tools/javac/defaultMethods/BadClassfile.java
@@ -26,9 +26,7 @@
* @bug 8025087
* @summary Verify that pre-JDK8 classfiles with default and/or static methods
* are refused correctly.
- * @enablePreview
- * @modules java.base/jdk.internal.classfile.impl
- * jdk.compiler/com.sun.tools.javac.api
+ * @modules jdk.compiler/com.sun.tools.javac.api
* jdk.compiler/com.sun.tools.javac.code
* jdk.compiler/com.sun.tools.javac.comp
* jdk.compiler/com.sun.tools.javac.jvm
diff --git a/test/langtools/tools/javac/defaultMethods/CheckACC_STRICTFlagOnDefaultMethodTest.java b/test/langtools/tools/javac/defaultMethods/CheckACC_STRICTFlagOnDefaultMethodTest.java
index fd321f3a269..398a2eca169 100644
--- a/test/langtools/tools/javac/defaultMethods/CheckACC_STRICTFlagOnDefaultMethodTest.java
+++ b/test/langtools/tools/javac/defaultMethods/CheckACC_STRICTFlagOnDefaultMethodTest.java
@@ -26,7 +26,6 @@
* @bug 8012723
* @summary strictfp interface misses strictfp modifer on default method
* @library /tools/lib /test/lib
- * @enablePreview
* @run main CheckACC_STRICTFlagOnDefaultMethodTest
*/
diff --git a/test/langtools/tools/javac/defaultMethods/TestDefaultBody.java b/test/langtools/tools/javac/defaultMethods/TestDefaultBody.java
index ec4e8b7b558..edf8427bc93 100644
--- a/test/langtools/tools/javac/defaultMethods/TestDefaultBody.java
+++ b/test/langtools/tools/javac/defaultMethods/TestDefaultBody.java
@@ -25,8 +25,6 @@
* @test
* @bug 7192246
* @summary check that code attributed for default methods is correctly generated
- * @enablePreview
- * @modules java.base/jdk.internal.classfile.impl
*/
import java.lang.classfile.*;
diff --git a/test/langtools/tools/javac/defaultMethods/TestNoBridgeOnDefaults.java b/test/langtools/tools/javac/defaultMethods/TestNoBridgeOnDefaults.java
index 5d334224dc7..cff1b10a7e5 100644
--- a/test/langtools/tools/javac/defaultMethods/TestNoBridgeOnDefaults.java
+++ b/test/langtools/tools/javac/defaultMethods/TestNoBridgeOnDefaults.java
@@ -25,8 +25,6 @@
* @test
* @bug 7192246
* @summary check that javac does not generate bridge methods for defaults
- * @enablePreview
- * @modules java.base/jdk.internal.classfile.impl
*/
import java.lang.classfile.*;
diff --git a/test/langtools/tools/javac/defaultMethods/super/TestDirectSuperInterfaceInvoke.java b/test/langtools/tools/javac/defaultMethods/super/TestDirectSuperInterfaceInvoke.java
index 8be378eaf7b..9aa52686bc4 100644
--- a/test/langtools/tools/javac/defaultMethods/super/TestDirectSuperInterfaceInvoke.java
+++ b/test/langtools/tools/javac/defaultMethods/super/TestDirectSuperInterfaceInvoke.java
@@ -25,8 +25,6 @@
* @test
* @bug 8027281
* @summary As per JVMS 4.9.2, invokespecial can only refer to direct superinterfaces
- * @enablePreview
- * @modules java.base/jdk.internal.classfile.impl
* @compile TestDirectSuperInterfaceInvoke.java
* @run main TestDirectSuperInterfaceInvoke
*/
diff --git a/test/langtools/tools/javac/diags/CheckResourceKeys.java b/test/langtools/tools/javac/diags/CheckResourceKeys.java
index 65d4ed24cb3..b5f5b2031de 100644
--- a/test/langtools/tools/javac/diags/CheckResourceKeys.java
+++ b/test/langtools/tools/javac/diags/CheckResourceKeys.java
@@ -25,10 +25,8 @@
* @test
* @bug 6964768 6964461 6964469 6964487 6964460 6964481 6980021
* @summary need test program to validate javac resource bundles
- * @enablePreview
* @modules jdk.compiler/com.sun.tools.javac.code
* jdk.compiler/com.sun.tools.javac.resources:open
- * java.base/jdk.internal.classfile.impl
*/
import java.io.*;
diff --git a/test/langtools/tools/javac/diags/Example.java b/test/langtools/tools/javac/diags/Example.java
index 1c76e429fd6..8940032367d 100644
--- a/test/langtools/tools/javac/diags/Example.java
+++ b/test/langtools/tools/javac/diags/Example.java
@@ -293,17 +293,6 @@ private void run(PrintWriter out, Set keys, boolean raw, boolean verbose
if (procFiles.size() > 0) {
List pOpts = new ArrayList<>(Arrays.asList("-d", classesDir.getPath()));
- // hack to automatically add exports; a better solution would be to grep the
- // source for import statements or a magic comment
- for (File pf: procFiles) {
- if (pf.getName().equals("CreateBadClassFile.java")) {
- pOpts.add("--enable-preview");
- pOpts.add("--source");
- pOpts.add(String.valueOf(Runtime.version().feature()));
- pOpts.add("--add-exports=java.base/jdk.internal.classfile.impl=ALL-UNNAMED");
- }
- }
-
new Jsr199Compiler(verbose).run(null, null, false, pOpts, procFiles);
opts.add("-classpath"); // avoid using -processorpath for now
opts.add(classesDir.getPath());
diff --git a/test/langtools/tools/javac/diags/examples/BadConstantValueType/BadConstantValueType.java b/test/langtools/tools/javac/diags/examples/BadConstantValueType/BadConstantValueType.java
index c8dac3a388d..1a9faf67547 100644
--- a/test/langtools/tools/javac/diags/examples/BadConstantValueType/BadConstantValueType.java
+++ b/test/langtools/tools/javac/diags/examples/BadConstantValueType/BadConstantValueType.java
@@ -25,7 +25,6 @@
// key: compiler.misc.bad.class.file.header
// key: compiler.err.cant.access
// options: -processor CreateBadClassFile
-// run: exec --enable-preview
/* The annotation processor will create an invalid classfile with a static
* final field of type java.lang.Object having ConstantValue attribute with
diff --git a/test/langtools/tools/javac/diags/examples/InvalidDefaultInterface/InvalidDefaultInterface.java b/test/langtools/tools/javac/diags/examples/InvalidDefaultInterface/InvalidDefaultInterface.java
index c61e123c647..bae237b09d2 100644
--- a/test/langtools/tools/javac/diags/examples/InvalidDefaultInterface/InvalidDefaultInterface.java
+++ b/test/langtools/tools/javac/diags/examples/InvalidDefaultInterface/InvalidDefaultInterface.java
@@ -25,7 +25,6 @@
// key: compiler.misc.bad.class.file.header
// key: compiler.err.cant.access
// options: -processor CreateBadClassFile
-// run: exec --enable-preview
/* The annotation processor will create an invalid classfile with version 51.0
* and a non-abstract method in an interface. Loading the classfile will produce
diff --git a/test/langtools/tools/javac/diags/examples/InvalidStaticInterface/InvalidStaticInterface.java b/test/langtools/tools/javac/diags/examples/InvalidStaticInterface/InvalidStaticInterface.java
index 264b8861107..ba739de15ec 100644
--- a/test/langtools/tools/javac/diags/examples/InvalidStaticInterface/InvalidStaticInterface.java
+++ b/test/langtools/tools/javac/diags/examples/InvalidStaticInterface/InvalidStaticInterface.java
@@ -25,7 +25,6 @@
// key: compiler.misc.bad.class.file.header
// key: compiler.err.cant.access
// options: -processor CreateBadClassFile
-// run: exec --enable-preview
/* The annotation processor will create an invalid classfile with version 51.0
* and a static method in an interface. Loading the classfile will produce
diff --git a/test/langtools/tools/javac/expression/_super/NonDirectSuper/NonDirectSuper.java b/test/langtools/tools/javac/expression/_super/NonDirectSuper/NonDirectSuper.java
index e4879302058..57f4fcde3e7 100644
--- a/test/langtools/tools/javac/expression/_super/NonDirectSuper/NonDirectSuper.java
+++ b/test/langtools/tools/javac/expression/_super/NonDirectSuper/NonDirectSuper.java
@@ -26,8 +26,6 @@
* @bug 8027789
* @summary check that the direct superclass is used as the site when calling
* a superclass' method
- * @enablePreview
- * @modules java.base/jdk.internal.classfile.impl
* @compile Base.java NonDirectSuper.java
* @run main test.NonDirectSuper
*/
diff --git a/test/langtools/tools/javac/file/SymLinkArchiveTest.java b/test/langtools/tools/javac/file/SymLinkArchiveTest.java
index eba933af49e..9cb544244f2 100644
--- a/test/langtools/tools/javac/file/SymLinkArchiveTest.java
+++ b/test/langtools/tools/javac/file/SymLinkArchiveTest.java
@@ -26,10 +26,8 @@
* @bug 8181897
* @summary
* @library /tools/lib
- * @enablePreview
* @modules jdk.compiler/com.sun.tools.javac.api
* jdk.compiler/com.sun.tools.javac.main
- * java.base/jdk.internal.classfile.impl
* @build toolbox.JavacTask toolbox.TestRunner toolbox.ToolBox
* @run main SymLinkArchiveTest
*/
diff --git a/test/langtools/tools/javac/file/SymLinkShortNameTest.java b/test/langtools/tools/javac/file/SymLinkShortNameTest.java
index 28f25f8b5bf..cb2d4ba058e 100644
--- a/test/langtools/tools/javac/file/SymLinkShortNameTest.java
+++ b/test/langtools/tools/javac/file/SymLinkShortNameTest.java
@@ -26,10 +26,8 @@
* @bug 8193277
* @summary SimpleFileObject inconsistency between getName and getShortName
* @library /tools/lib
- * @enablePreview
* @modules jdk.compiler/com.sun.tools.javac.api
* jdk.compiler/com.sun.tools.javac.main
- * java.base/jdk.internal.classfile.impl
* @build toolbox.JavacTask toolbox.TestRunner toolbox.ToolBox
* @run main SymLinkShortNameTest
*/
diff --git a/test/langtools/tools/javac/file/SymLinkTest.java b/test/langtools/tools/javac/file/SymLinkTest.java
index 45405aac2ee..ea5295505e1 100644
--- a/test/langtools/tools/javac/file/SymLinkTest.java
+++ b/test/langtools/tools/javac/file/SymLinkTest.java
@@ -28,10 +28,8 @@
* class.public.should.be.in.file diagnostic and SourceFile
* attribute content
* @library /tools/lib
- * @enablePreview
* @modules jdk.compiler/com.sun.tools.javac.api
* jdk.compiler/com.sun.tools.javac.main
- * java.base/jdk.internal.classfile.impl
* @build toolbox.JavacTask toolbox.TestRunner toolbox.ToolBox
* @run main SymLinkTest
*/
diff --git a/test/langtools/tools/javac/flow/LVTHarness.java b/test/langtools/tools/javac/flow/LVTHarness.java
index cd4374d93e2..3686323567b 100644
--- a/test/langtools/tools/javac/flow/LVTHarness.java
+++ b/test/langtools/tools/javac/flow/LVTHarness.java
@@ -28,8 +28,6 @@
* javac crash while creating LVT entry for a local variable defined in
* an inner block
* @library /tools/javac/lib
- * @enablePreview
- * @modules java.base/jdk.internal.classfile.impl
* @build JavacTestingAbstractProcessor LVTHarness
* @run main LVTHarness
*/
diff --git a/test/langtools/tools/javac/generics/bridges/BridgeHarness.java b/test/langtools/tools/javac/generics/bridges/BridgeHarness.java
index acf1a3cdef1..25414c8127c 100644
--- a/test/langtools/tools/javac/generics/bridges/BridgeHarness.java
+++ b/test/langtools/tools/javac/generics/bridges/BridgeHarness.java
@@ -26,9 +26,7 @@
* @bug 8013789
* @summary Compiler should emit bridges in interfaces
* @library /tools/javac/lib
- * @enablePreview
- * @modules java.base/jdk.internal.classfile.impl
- * jdk.compiler/com.sun.tools.javac.code
+ * @modules jdk.compiler/com.sun.tools.javac.code
* jdk.compiler/com.sun.tools.javac.util
* @build JavacTestingAbstractProcessor BridgeHarness
* @run main BridgeHarness
diff --git a/test/langtools/tools/javac/importscope/T8193717.java b/test/langtools/tools/javac/importscope/T8193717.java
index bb2f0e87462..6ca58eb8a89 100644
--- a/test/langtools/tools/javac/importscope/T8193717.java
+++ b/test/langtools/tools/javac/importscope/T8193717.java
@@ -26,9 +26,7 @@
* @bug 8193717
* @summary Check that code with a lot named imports can compile.
* @library /tools/lib
- * @enablePreview
- * @modules java.base/jdk.internal.classfile.impl
- * jdk.compiler/com.sun.tools.javac.api
+ * @modules jdk.compiler/com.sun.tools.javac.api
* jdk.compiler/com.sun.tools.javac.main
* jdk.jdeps/com.sun.tools.javap
* @build toolbox.ToolBox toolbox.JavapTask
diff --git a/test/langtools/tools/javac/jvm/ClassRefDupInConstantPoolTest.java b/test/langtools/tools/javac/jvm/ClassRefDupInConstantPoolTest.java
index df700552ae9..3ea1f5b72bb 100644
--- a/test/langtools/tools/javac/jvm/ClassRefDupInConstantPoolTest.java
+++ b/test/langtools/tools/javac/jvm/ClassRefDupInConstantPoolTest.java
@@ -25,7 +25,6 @@
* @test
* @bug 8015927
* @summary Class reference duplicates in constant pool
- * @enablePreview
* @clean ClassRefDupInConstantPoolTest$Duplicates
* @run main ClassRefDupInConstantPoolTest
*/
diff --git a/test/langtools/tools/javac/lambda/ByteCodeTest.java b/test/langtools/tools/javac/lambda/ByteCodeTest.java
index df5c8df1ff9..f273305925c 100644
--- a/test/langtools/tools/javac/lambda/ByteCodeTest.java
+++ b/test/langtools/tools/javac/lambda/ByteCodeTest.java
@@ -26,8 +26,6 @@
* @bug 8011738
* @author sogoel
* @summary Code translation test for Lambda expressions, method references
- * @enablePreview
- * @modules java.base/jdk.internal.classfile.impl
* @run main ByteCodeTest
*/
diff --git a/test/langtools/tools/javac/lambda/LambdaTestStrictFPFlag.java b/test/langtools/tools/javac/lambda/LambdaTestStrictFPFlag.java
index 47bc3f78f79..d4fc3eae0be 100644
--- a/test/langtools/tools/javac/lambda/LambdaTestStrictFPFlag.java
+++ b/test/langtools/tools/javac/lambda/LambdaTestStrictFPFlag.java
@@ -26,7 +26,6 @@
* @bug 8046060
* @summary Different results of floating point multiplication for lambda code block
* @library /tools/lib /test/lib
- * @enablePreview
* @run main LambdaTestStrictFPFlag
*/
diff --git a/test/langtools/tools/javac/lambda/LocalVariableTable.java b/test/langtools/tools/javac/lambda/LocalVariableTable.java
index e78fed1288a..cb243957287 100644
--- a/test/langtools/tools/javac/lambda/LocalVariableTable.java
+++ b/test/langtools/tools/javac/lambda/LocalVariableTable.java
@@ -25,8 +25,6 @@
* @test
* @bug 8025998 8026749 8054220 8058227
* @summary Missing LV table in lambda bodies
- * @enablePreview
- * @modules java.base/jdk.internal.classfile.impl
* @compile -g LocalVariableTable.java
* @run main LocalVariableTable
*/
diff --git a/test/langtools/tools/javac/lambda/TestBootstrapMethodsCount.java b/test/langtools/tools/javac/lambda/TestBootstrapMethodsCount.java
index 1220bf4dfa4..46a381c97c2 100644
--- a/test/langtools/tools/javac/lambda/TestBootstrapMethodsCount.java
+++ b/test/langtools/tools/javac/lambda/TestBootstrapMethodsCount.java
@@ -26,9 +26,7 @@
* @bug 8129547
* @summary Excess entries in BootstrapMethods with the same (bsm, bsmKind, bsmStaticArgs), but different dynamicArgs
* @library /tools/javac/lib
- * @enablePreview
- * @modules java.base/jdk.internal.classfile.impl
- * jdk.compiler/com.sun.tools.javac.api
+ * @modules jdk.compiler/com.sun.tools.javac.api
* jdk.compiler/com.sun.tools.javac.code
* jdk.compiler/com.sun.tools.javac.jvm
* jdk.compiler/com.sun.tools.javac.tree
diff --git a/test/langtools/tools/javac/lambda/TestInvokeDynamic.java b/test/langtools/tools/javac/lambda/TestInvokeDynamic.java
index 05c304cdd31..9ad73564e23 100644
--- a/test/langtools/tools/javac/lambda/TestInvokeDynamic.java
+++ b/test/langtools/tools/javac/lambda/TestInvokeDynamic.java
@@ -28,9 +28,7 @@
* Add back-end support for invokedynamic
* temporarily workaround combo tests are causing time out in several platforms
* @library /tools/javac/lib
- * @enablePreview
- * @modules java.base/jdk.internal.classfile.impl
- * jdk.compiler/com.sun.tools.javac.api
+ * @modules jdk.compiler/com.sun.tools.javac.api
* jdk.compiler/com.sun.tools.javac.code
* jdk.compiler/com.sun.tools.javac.file
* jdk.compiler/com.sun.tools.javac.jvm
diff --git a/test/langtools/tools/javac/lambda/bytecode/TestLambdaBytecode.java b/test/langtools/tools/javac/lambda/bytecode/TestLambdaBytecode.java
index c19c848ee68..f7741921b70 100644
--- a/test/langtools/tools/javac/lambda/bytecode/TestLambdaBytecode.java
+++ b/test/langtools/tools/javac/lambda/bytecode/TestLambdaBytecode.java
@@ -27,9 +27,7 @@
* @summary Lambda back-end should generate invokevirtual for method handles referring to
* private instance methods as lambda proxy is a nestmate of the target clsas
* @library /tools/javac/lib
- * @enablePreview
- * @modules java.base/jdk.internal.classfile.impl
- * jdk.compiler/com.sun.tools.javac.api
+ * @modules jdk.compiler/com.sun.tools.javac.api
* jdk.compiler/com.sun.tools.javac.file
* jdk.compiler/com.sun.tools.javac.util
* @build combo.ComboTestHelper
diff --git a/test/langtools/tools/javac/lambda/bytecode/TestLambdaBytecodeTargetRelease14.java b/test/langtools/tools/javac/lambda/bytecode/TestLambdaBytecodeTargetRelease14.java
index 326de3168b3..6970832c45b 100644
--- a/test/langtools/tools/javac/lambda/bytecode/TestLambdaBytecodeTargetRelease14.java
+++ b/test/langtools/tools/javac/lambda/bytecode/TestLambdaBytecodeTargetRelease14.java
@@ -27,9 +27,7 @@
* @summary Lambda back-end should generate invokespecial for method handles referring to
* private instance methods when compiling with --release 14
* @library /tools/javac/lib
- * @enablePreview
- * @modules java.base/jdk.internal.classfile.impl
- * jdk.compiler/com.sun.tools.javac.api
+ * @modules jdk.compiler/com.sun.tools.javac.api
* jdk.compiler/com.sun.tools.javac.file
* jdk.compiler/com.sun.tools.javac.util
* @build combo.ComboTestHelper
diff --git a/test/langtools/tools/javac/lambda/deduplication/DeduplicationTest.java b/test/langtools/tools/javac/lambda/deduplication/DeduplicationTest.java
index b9261632f61..10cbde8a2a4 100644
--- a/test/langtools/tools/javac/lambda/deduplication/DeduplicationTest.java
+++ b/test/langtools/tools/javac/lambda/deduplication/DeduplicationTest.java
@@ -24,9 +24,7 @@
/**
* @test 8200301 8201194
* @summary deduplicate lambda methods with the same body, target type, and captured state
- * @enablePreview
* @modules
- * java.base/jdk.internal.classfile.impl
* jdk.compiler/com.sun.tools.javac.api
* jdk.compiler/com.sun.tools.javac.code jdk.compiler/com.sun.tools.javac.comp
* jdk.compiler/com.sun.tools.javac.file jdk.compiler/com.sun.tools.javac.main
@@ -66,7 +64,6 @@
import com.sun.tools.javac.tree.TreeScanner;
import com.sun.tools.javac.util.Context;
import com.sun.tools.javac.util.JCDiagnostic;
-import jdk.internal.classfile.impl.BootstrapMethodEntryImpl;
import java.io.InputStream;
import java.nio.file.Path;
@@ -156,7 +153,7 @@ public static void main(String[] args) throws Exception {
}
BootstrapMethodsAttribute bsm = cm.findAttribute(Attributes.bootstrapMethods()).orElseThrow();
for (BootstrapMethodEntry b : bsm.bootstrapMethods()) {
- if (((BootstrapMethodEntryImpl) b).bootstrapMethod().asSymbol().methodName().equals("metafactory")) {
+ if (b.bootstrapMethod().asSymbol().methodName().equals("metafactory")) {
bootstrapMethodNames.add(
((MethodHandleEntry) b.arguments().get(1))
.reference()
diff --git a/test/langtools/tools/javac/lambda/lambdaNaming/TestNonSerializableLambdaNameStability.java b/test/langtools/tools/javac/lambda/lambdaNaming/TestNonSerializableLambdaNameStability.java
index 8052c4b67bc..7b418f6184d 100644
--- a/test/langtools/tools/javac/lambda/lambdaNaming/TestNonSerializableLambdaNameStability.java
+++ b/test/langtools/tools/javac/lambda/lambdaNaming/TestNonSerializableLambdaNameStability.java
@@ -26,9 +26,7 @@
* @bug 8067422
* @summary Check that the lambda names are not unnecessarily unstable
* @library /tools/lib
- * @enablePreview
- * @modules java.base/jdk.internal.classfile.impl
- * jdk.compiler/com.sun.tools.javac.api
+ * @modules jdk.compiler/com.sun.tools.javac.api
* jdk.compiler/com.sun.tools.javac.main
* jdk.jdeps/com.sun.tools.javap
* @build toolbox.ToolBox toolbox.JavacTask
diff --git a/test/langtools/tools/javac/launcher/GetResourceTest.java b/test/langtools/tools/javac/launcher/GetResourceTest.java
index 4b46cb034ee..8cb9ce9fe72 100644
--- a/test/langtools/tools/javac/launcher/GetResourceTest.java
+++ b/test/langtools/tools/javac/launcher/GetResourceTest.java
@@ -25,7 +25,6 @@
* @test
* @bug 8210009 8321739
* @summary Source Launcher classloader should support getResource and getResourceAsStream
- * @enablePreview
* @modules jdk.compiler
* @library /tools/lib
* @build toolbox.JavaTask toolbox.ToolBox
@@ -54,7 +53,6 @@ void run() throws Exception {
ToolBox tb = new ToolBox();
Path file = Paths.get(tb.testSrc).resolve("src/p/q").resolve("CLTest.java");
new JavaTask(tb)
- .vmOptions("--enable-preview", "--source", String.valueOf(Runtime.version().feature()))
.className(file.toString()) // implies source file mode
.run(Task.Expect.SUCCESS)
.writeAll();
diff --git a/test/langtools/tools/javac/launcher/SourceLauncherTest.java b/test/langtools/tools/javac/launcher/SourceLauncherTest.java
index 090c4e298fd..3676ced9535 100644
--- a/test/langtools/tools/javac/launcher/SourceLauncherTest.java
+++ b/test/langtools/tools/javac/launcher/SourceLauncherTest.java
@@ -26,11 +26,9 @@
* @bug 8192920 8204588 8246774 8248843 8268869 8235876 8328339 8335896
* @summary Test source launcher
* @library /tools/lib
- * @enablePreview
* @modules jdk.compiler/com.sun.tools.javac.api
* jdk.compiler/com.sun.tools.javac.launcher
* jdk.compiler/com.sun.tools.javac.main
- * java.base/jdk.internal.classfile.impl
* java.base/jdk.internal.module
* @build toolbox.JavaTask toolbox.JavacTask toolbox.TestRunner toolbox.ToolBox
* @run main SourceLauncherTest
@@ -566,7 +564,7 @@ public void testNoMain(Path base) throws IOException {
"error: can't find main(String[]) method in class: NoMain");
}
- //@Test temporary disabled as enabled preview allows no-param main
+ @Test
public void testMainBadParams(Path base) throws IOException {
tb.writeJavaFiles(base,
"class BadParams { public static void main() { } }");
@@ -574,7 +572,7 @@ public void testMainBadParams(Path base) throws IOException {
"error: can't find main(String[]) method in class: BadParams");
}
- //@Test temporary disabled as enabled preview allows non-public main
+ @Test
public void testMainNotPublic(Path base) throws IOException {
tb.writeJavaFiles(base,
"class NotPublic { static void main(String... args) { } }");
@@ -582,7 +580,7 @@ public void testMainNotPublic(Path base) throws IOException {
"error: can't find main(String[]) method in class: NotPublic");
}
- //@Test temporary disabled as enabled preview allows non-static main
+ @Test
public void testMainNotStatic(Path base) throws IOException {
tb.writeJavaFiles(base,
"class NotStatic { public void main(String... args) { } }");
diff --git a/test/langtools/tools/javac/launcher/src/p/q/CLTest.java b/test/langtools/tools/javac/launcher/src/p/q/CLTest.java
index 9f7e5577847..4ec90245659 100644
--- a/test/langtools/tools/javac/launcher/src/p/q/CLTest.java
+++ b/test/langtools/tools/javac/launcher/src/p/q/CLTest.java
@@ -30,9 +30,7 @@
* The class uses the ClassFile library to validate the contents of
* the URLs and streams returned by the methods being tested.
*
- * $ java \
- * --enable-preview
- * /path/to/CLTest.java
+ * $ java /path/to/CLTest.java
*/
package p.q;
diff --git a/test/langtools/tools/javac/linenumbers/ConditionalLineNumberTest.java b/test/langtools/tools/javac/linenumbers/ConditionalLineNumberTest.java
index c44def84987..5e1cce76a28 100644
--- a/test/langtools/tools/javac/linenumbers/ConditionalLineNumberTest.java
+++ b/test/langtools/tools/javac/linenumbers/ConditionalLineNumberTest.java
@@ -25,7 +25,6 @@
* @test
* @bug 8034091
* @summary Add LineNumberTable attributes for conditional operator (?:) split across several lines.
- * @enablePreview
*/
import java.lang.classfile.*;
diff --git a/test/langtools/tools/javac/linenumbers/FinallyLineNumberTest.java b/test/langtools/tools/javac/linenumbers/FinallyLineNumberTest.java
index d150c6bb4b7..d1fbadb6f2f 100644
--- a/test/langtools/tools/javac/linenumbers/FinallyLineNumberTest.java
+++ b/test/langtools/tools/javac/linenumbers/FinallyLineNumberTest.java
@@ -25,7 +25,6 @@
* @test
* @bug 8134759
* @summary Add LineNumberTable attribute for return bytecodes split around finally code
- * @enablePreview
*/
import java.lang.classfile.*;
diff --git a/test/langtools/tools/javac/linenumbers/NestedLineNumberTest.java b/test/langtools/tools/javac/linenumbers/NestedLineNumberTest.java
index 108a31c23db..8827839eb23 100644
--- a/test/langtools/tools/javac/linenumbers/NestedLineNumberTest.java
+++ b/test/langtools/tools/javac/linenumbers/NestedLineNumberTest.java
@@ -2,7 +2,6 @@
* @test /nodynamiccopyright/
* @bug 8061778
* @summary Wrong LineNumberTable for default constructors
- * @enablePreview
*/
import java.util.List;
@@ -21,8 +20,8 @@ public static void main(String[] args) throws Exception {
}
int line = lines.get(0).lineNumber();
- if (line != 50) {
- error(String.format("LineNumberTable contains wrong line number - expected %d, found %d", 50, line));
+ if (line != 49) {
+ error(String.format("LineNumberTable contains wrong line number - expected %d, found %d", 49, line));
}
}
diff --git a/test/langtools/tools/javac/linenumbers/NullCheckLineNumberTest.java b/test/langtools/tools/javac/linenumbers/NullCheckLineNumberTest.java
index d74a0e5667b..48a999c90a2 100644
--- a/test/langtools/tools/javac/linenumbers/NullCheckLineNumberTest.java
+++ b/test/langtools/tools/javac/linenumbers/NullCheckLineNumberTest.java
@@ -2,7 +2,6 @@
* @test /nodynamiccopyright/
* @bug 8172880
* @summary Wrong LineNumberTable for synthetic null checks
- * @enablePreview
*/
import java.lang.classfile.*;
@@ -36,13 +35,13 @@ public Test() {
public static void main(String[] args) throws Exception {
List actualEntries = findEntries();
List expectedEntries = List.of(
- new SimpleEntry<>(25, 0),
- new SimpleEntry<>(26, 4),
- new SimpleEntry<>(28, 9),
- new SimpleEntry<>(29, 16),
- new SimpleEntry<>(30, 32),
- new SimpleEntry<>(31, 46),
- new SimpleEntry<>(32, 52)
+ new SimpleEntry<>(24, 0),
+ new SimpleEntry<>(25, 4),
+ new SimpleEntry<>(27, 9),
+ new SimpleEntry<>(28, 16),
+ new SimpleEntry<>(29, 32),
+ new SimpleEntry<>(30, 46),
+ new SimpleEntry<>(31, 52)
);
if (!Objects.equals(actualEntries, expectedEntries)) {
error(String.format("Unexpected LineNumberTable: %s", actualEntries.toString()));
@@ -53,8 +52,8 @@ public static void main(String[] args) throws Exception {
} catch (NullPointerException npe) {
if (Arrays.stream(npe.getStackTrace())
.noneMatch(se -> se.getFileName().contains("NullCheckLineNumberTest") &&
- se.getLineNumber() == 30)) {
- throw new AssertionError("Should go through line 30!");
+ se.getLineNumber() == 29)) {
+ throw new AssertionError("Should go through line 29!");
}
}
}
diff --git a/test/langtools/tools/javac/meth/TestCP.java b/test/langtools/tools/javac/meth/TestCP.java
index bc574134b89..b01ac799b55 100644
--- a/test/langtools/tools/javac/meth/TestCP.java
+++ b/test/langtools/tools/javac/meth/TestCP.java
@@ -25,8 +25,6 @@
* @test
* @bug 6991980
* @summary polymorphic signature calls don't share the same CP entries
- * @enablePreview
- * @modules java.base/jdk.internal.classfile.impl
* @run main TestCP
*/
diff --git a/test/langtools/tools/javac/modules/AnnotationsOnModules.java b/test/langtools/tools/javac/modules/AnnotationsOnModules.java
index 909b5294d00..65019854360 100644
--- a/test/langtools/tools/javac/modules/AnnotationsOnModules.java
+++ b/test/langtools/tools/javac/modules/AnnotationsOnModules.java
@@ -26,10 +26,8 @@
* @bug 8159602 8170549 8171255 8171322 8254023 8341966
* @summary Test annotations on module declaration.
* @library /tools/lib
- * @enablePreview
* @modules jdk.compiler/com.sun.tools.javac.api
* jdk.compiler/com.sun.tools.javac.main
- * java.base/jdk.internal.classfile.impl
* @build toolbox.ToolBox toolbox.JavacTask ModuleTestBase
* @run main AnnotationsOnModules
*/
diff --git a/test/langtools/tools/javac/modules/IncubatingTest.java b/test/langtools/tools/javac/modules/IncubatingTest.java
index ce9d372a2f6..68f615abc04 100644
--- a/test/langtools/tools/javac/modules/IncubatingTest.java
+++ b/test/langtools/tools/javac/modules/IncubatingTest.java
@@ -26,10 +26,8 @@
* @bug 8171177 8187591
* @summary Verify that ModuleResolution attribute flags are honored.
* @library /tools/lib
- * @enablePreview
* @modules jdk.compiler/com.sun.tools.javac.api
* jdk.compiler/com.sun.tools.javac.main
- * java.base/jdk.internal.classfile.impl
* java.base/jdk.internal.module
* jdk.jdeps/com.sun.tools.javap
* @build toolbox.ToolBox toolbox.JarTask toolbox.JavacTask toolbox.JavapTask ModuleTestBase
diff --git a/test/langtools/tools/javac/modules/JavaBaseTest.java b/test/langtools/tools/javac/modules/JavaBaseTest.java
index 484225fcd0c..935ddfa1d43 100644
--- a/test/langtools/tools/javac/modules/JavaBaseTest.java
+++ b/test/langtools/tools/javac/modules/JavaBaseTest.java
@@ -26,13 +26,11 @@
* @bug 8193125 8196623 8335989
* @summary test modifiers with java.base
* @library /tools/lib
- * @enablePreview
* @modules
* jdk.compiler/com.sun.tools.javac.api
* jdk.compiler/com.sun.tools.javac.jvm
* jdk.compiler/com.sun.tools.javac.main
* jdk.compiler/com.sun.tools.javac.platform
- * java.base/jdk.internal.classfile.impl
* @build toolbox.ToolBox toolbox.JavacTask
* @run main JavaBaseTest
*/
diff --git a/test/langtools/tools/javac/modules/ModuleVersion.java b/test/langtools/tools/javac/modules/ModuleVersion.java
index cbf9b82c54c..c5368b394a1 100644
--- a/test/langtools/tools/javac/modules/ModuleVersion.java
+++ b/test/langtools/tools/javac/modules/ModuleVersion.java
@@ -25,10 +25,8 @@
* @test
* @summary simple tests of module uses
* @library /tools/lib
- * @enablePreview
* @modules jdk.compiler/com.sun.tools.javac.api
* jdk.compiler/com.sun.tools.javac.main
- * java.base/jdk.internal.classfile.impl
* @build toolbox.ToolBox toolbox.JavacTask toolbox.ModuleBuilder ModuleTestBase
* @run main ModuleVersion
*/
diff --git a/test/langtools/tools/javac/modules/OpenModulesTest.java b/test/langtools/tools/javac/modules/OpenModulesTest.java
index f2bf1d00cc7..dc4c78912aa 100644
--- a/test/langtools/tools/javac/modules/OpenModulesTest.java
+++ b/test/langtools/tools/javac/modules/OpenModulesTest.java
@@ -25,10 +25,8 @@
* @test
* @summary tests for multi-module mode compilation
* @library /tools/lib
- * @enablePreview
* @modules jdk.compiler/com.sun.tools.javac.api
* jdk.compiler/com.sun.tools.javac.main
- * java.base/jdk.internal.classfile.impl
* jdk.jdeps/com.sun.tools.javap
* @build toolbox.ToolBox toolbox.JavacTask toolbox.ModuleBuilder ModuleTestBase
* @run main OpenModulesTest
diff --git a/test/langtools/tools/javac/multicatch/7005371/T7005371.java b/test/langtools/tools/javac/multicatch/7005371/T7005371.java
index c99371642a6..a8f71a1d078 100644
--- a/test/langtools/tools/javac/multicatch/7005371/T7005371.java
+++ b/test/langtools/tools/javac/multicatch/7005371/T7005371.java
@@ -25,8 +25,6 @@
* @test
* @bug 7005371
* @summary Multicatch: assertion error while generating LocalVariableTypeTable attribute
- * @enablePreview
- * @modules java.base/jdk.internal.classfile.impl
* @compile -g SubTest.java
* @run main T7005371
*/
diff --git a/test/langtools/tools/javac/multicatch/Pos05.java b/test/langtools/tools/javac/multicatch/Pos05.java
index 16ee54f2ccd..b3e6882752f 100644
--- a/test/langtools/tools/javac/multicatch/Pos05.java
+++ b/test/langtools/tools/javac/multicatch/Pos05.java
@@ -25,8 +25,6 @@
* @test
* @bug 6943289
* @summary Project Coin: Improved Exception Handling for Java (aka 'multicatch')
- * @enablePreview
- * @modules java.base/jdk.internal.classfile.impl
* @run main Pos05
*/
diff --git a/test/langtools/tools/javac/patterns/Annotations.java b/test/langtools/tools/javac/patterns/Annotations.java
index a8106a39827..849e104d2ba 100644
--- a/test/langtools/tools/javac/patterns/Annotations.java
+++ b/test/langtools/tools/javac/patterns/Annotations.java
@@ -26,13 +26,11 @@
* @bug 8256266 8281238
* @summary Verify annotations work correctly on binding variables
* @library /tools/javac/lib
- * @enablePreview
* @modules java.compiler
* jdk.compiler
- * java.base/jdk.internal.classfile.impl
* @build JavacTestingAbstractProcessor
* @compile Annotations.java
- * @compile -J--enable-preview -processor Annotations -proc:only Annotations.java
+ * @compile -processor Annotations -proc:only Annotations.java
* @run main Annotations
*/
diff --git a/test/langtools/tools/javac/patterns/LocalVariableTable.java b/test/langtools/tools/javac/patterns/LocalVariableTable.java
index 37051daf142..1b80743bb26 100644
--- a/test/langtools/tools/javac/patterns/LocalVariableTable.java
+++ b/test/langtools/tools/javac/patterns/LocalVariableTable.java
@@ -25,8 +25,6 @@
* @test
* @bug 8231827
* @summary Ensure the LV table entries are generated for bindings
- * @enablePreview
- * @modules java.base/jdk.internal.classfile.impl
* @compile -g LocalVariableTable.java
* @run main LocalVariableTable
*/
diff --git a/test/langtools/tools/javac/patterns/MatchExceptionTest.java b/test/langtools/tools/javac/patterns/MatchExceptionTest.java
index b54d0492bdf..1f761faaec1 100644
--- a/test/langtools/tools/javac/patterns/MatchExceptionTest.java
+++ b/test/langtools/tools/javac/patterns/MatchExceptionTest.java
@@ -26,10 +26,8 @@
* @bug 8297118
* @summary Verify javac uses MatchException or IncompatibleClassChangeError for exhaustive switches
* @library /tools/lib
- * @enablePreview
* @modules jdk.compiler/com.sun.tools.javac.api
* jdk.compiler/com.sun.tools.javac.main
- * java.base/jdk.internal.classfile.impl
* @build toolbox.ToolBox toolbox.JavacTask
* @run main MatchExceptionTest
*/
diff --git a/test/langtools/tools/javac/patterns/NestedPatternVariablesBytecode.java b/test/langtools/tools/javac/patterns/NestedPatternVariablesBytecode.java
index 36068729146..ddec9fd2e56 100644
--- a/test/langtools/tools/javac/patterns/NestedPatternVariablesBytecode.java
+++ b/test/langtools/tools/javac/patterns/NestedPatternVariablesBytecode.java
@@ -26,10 +26,8 @@
* @bug 8268748
* @summary Javac generates error opcodes when using nest pattern variables
* @library /tools/lib
- * @enablePreview
* @modules jdk.compiler/com.sun.tools.javac.api
* jdk.compiler/com.sun.tools.javac.main
- * java.base/jdk.internal.classfile.impl
* @build toolbox.ToolBox toolbox.JavacTask
* @run main NestedPatternVariablesBytecode
*/
diff --git a/test/langtools/tools/javac/patterns/NoUnnecessaryCast.java b/test/langtools/tools/javac/patterns/NoUnnecessaryCast.java
index 55444e1d748..84d4752671e 100644
--- a/test/langtools/tools/javac/patterns/NoUnnecessaryCast.java
+++ b/test/langtools/tools/javac/patterns/NoUnnecessaryCast.java
@@ -26,8 +26,6 @@
* @bug 8237528
* @summary Verify there are no unnecessary checkcasts and conditions generated
* for the pattern matching in instanceof.
- * @enablePreview
- * @modules java.base/jdk.internal.classfile.impl
* @compile NoUnnecessaryCast.java
* @run main NoUnnecessaryCast
*/
diff --git a/test/langtools/tools/javac/platform/ModuleVersionTest.java b/test/langtools/tools/javac/platform/ModuleVersionTest.java
index 0e8f8b8c05f..457674cf45c 100644
--- a/test/langtools/tools/javac/platform/ModuleVersionTest.java
+++ b/test/langtools/tools/javac/platform/ModuleVersionTest.java
@@ -26,7 +26,6 @@
* @bug 8318913
* @summary Verify correct module versions are recorded when --release is used.
* @library /tools/lib
- * @enablePreview
* @modules
* jdk.compiler/com.sun.tools.javac.api
* jdk.compiler/com.sun.tools.javac.main
diff --git a/test/langtools/tools/javac/platform/VerifyCTSymClassFiles.java b/test/langtools/tools/javac/platform/VerifyCTSymClassFiles.java
index c97b15a2b15..3c563904b16 100644
--- a/test/langtools/tools/javac/platform/VerifyCTSymClassFiles.java
+++ b/test/langtools/tools/javac/platform/VerifyCTSymClassFiles.java
@@ -25,7 +25,6 @@
* @test
* @bug 8331027
* @summary Verify classfile inside ct.sym
- * @enablePreview
* @library /tools/lib
* @modules jdk.compiler/com.sun.tools.javac.api
* jdk.compiler/com.sun.tools.javac.main
diff --git a/test/langtools/tools/javac/platform/createsymbols/CreateSymbolsTest.java b/test/langtools/tools/javac/platform/createsymbols/CreateSymbolsTest.java
index 7f7400a65b4..97def1b1480 100644
--- a/test/langtools/tools/javac/platform/createsymbols/CreateSymbolsTest.java
+++ b/test/langtools/tools/javac/platform/createsymbols/CreateSymbolsTest.java
@@ -25,7 +25,6 @@
* @test
* @bug 8072480 8277106 8331027
* @summary Unit test for CreateSymbols
- * @enablePreview
* @modules java.compiler
* jdk.compiler/com.sun.tools.javac.api
* jdk.compiler/com.sun.tools.javac.jvm
@@ -102,9 +101,6 @@ void doRun() throws Exception {
null,
List.of("-d",
compileDir.toAbsolutePath().toString(),
- "--enable-preview",
- "--source",
- "" + System.getProperty("java.specification.version"),
"-g",
"--add-modules", "jdk.jdeps",
"--add-exports", "jdk.compiler/com.sun.tools.javac.api=ALL-UNNAMED",
diff --git a/test/langtools/tools/javac/preview/PreviewAutoSuppress.java b/test/langtools/tools/javac/preview/PreviewAutoSuppress.java
index d77bd3b22da..20e562fe2d9 100644
--- a/test/langtools/tools/javac/preview/PreviewAutoSuppress.java
+++ b/test/langtools/tools/javac/preview/PreviewAutoSuppress.java
@@ -25,11 +25,9 @@
* @test
* @bug 8250768
* @library /tools/lib
- * @enablePreview
* @modules
* jdk.compiler/com.sun.tools.javac.api
* jdk.compiler/com.sun.tools.javac.main
- * java.base/jdk.internal.classfile.impl
* @build toolbox.ToolBox toolbox.JavacTask
* @run main PreviewAutoSuppress
*/
diff --git a/test/langtools/tools/javac/preview/PreviewErrors.java b/test/langtools/tools/javac/preview/PreviewErrors.java
index 8c76423c9d2..3ec1e99b2ed 100644
--- a/test/langtools/tools/javac/preview/PreviewErrors.java
+++ b/test/langtools/tools/javac/preview/PreviewErrors.java
@@ -26,14 +26,12 @@
* @bug 8226585 8250768
* @summary Verify behavior w.r.t. preview feature API errors and warnings
* @library /tools/lib /tools/javac/lib
- * @enablePreview
* @modules
* java.base/jdk.internal.javac
* jdk.compiler/com.sun.tools.javac.api
* jdk.compiler/com.sun.tools.javac.file
* jdk.compiler/com.sun.tools.javac.main
* jdk.compiler/com.sun.tools.javac.util
- * java.base/jdk.internal.classfile.impl
* @build toolbox.ToolBox toolbox.JavacTask
* @build combo.ComboTestHelper
* @run main PreviewErrors
diff --git a/test/langtools/tools/javac/preview/PreviewTest.java b/test/langtools/tools/javac/preview/PreviewTest.java
index ad67ef8ac87..36f1e70acd0 100644
--- a/test/langtools/tools/javac/preview/PreviewTest.java
+++ b/test/langtools/tools/javac/preview/PreviewTest.java
@@ -25,11 +25,9 @@
* @test
* @bug 8282823 8343540
* @library /tools/lib
- * @enablePreview
* @modules
* jdk.compiler/com.sun.tools.javac.api
* jdk.compiler/com.sun.tools.javac.main
- * java.base/jdk.internal.classfile.impl
* @build toolbox.ToolBox toolbox.JavacTask
* @run main PreviewTest
*/
diff --git a/test/langtools/tools/javac/processing/model/element/TestFileObjectOf.java b/test/langtools/tools/javac/processing/model/element/TestFileObjectOf.java
index 3fef2fe434c..15d04e39d01 100644
--- a/test/langtools/tools/javac/processing/model/element/TestFileObjectOf.java
+++ b/test/langtools/tools/javac/processing/model/element/TestFileObjectOf.java
@@ -26,10 +26,8 @@
* @bug 8224922
* @summary Verify the behavior of the Elements.getFileObjectOf
* @library /tools/lib
- * @enablePreview
* @modules jdk.compiler/com.sun.tools.javac.api
* jdk.compiler/com.sun.tools.javac.main
- * java.base/jdk.internal.classfile.impl
* @build toolbox.ToolBox toolbox.JavacTask toolbox.TestRunner
* @build TestFileObjectOf
* @run main TestFileObjectOf
diff --git a/test/langtools/tools/javac/processing/model/element/TestOrigin.java b/test/langtools/tools/javac/processing/model/element/TestOrigin.java
index dee13cbbeb2..b12f8f2dedc 100644
--- a/test/langtools/tools/javac/processing/model/element/TestOrigin.java
+++ b/test/langtools/tools/javac/processing/model/element/TestOrigin.java
@@ -26,10 +26,8 @@
* @bug 8171355
* @summary Test behavior of javax.lang.model.util.Elements.getOrigin.
* @library /tools/lib
- * @enablePreview
* @modules jdk.compiler/com.sun.tools.javac.api
* jdk.compiler/com.sun.tools.javac.main
- * java.base/jdk.internal.classfile.impl
* @build toolbox.ToolBox toolbox.JavacTask toolbox.TestRunner
* @build TestOrigin
* @run main TestOrigin
diff --git a/test/langtools/tools/javac/records/RecordCompilationTests.java b/test/langtools/tools/javac/records/RecordCompilationTests.java
index a01712fedb3..1de0ec48f0d 100644
--- a/test/langtools/tools/javac/records/RecordCompilationTests.java
+++ b/test/langtools/tools/javac/records/RecordCompilationTests.java
@@ -29,12 +29,10 @@
* 8332600
* @summary Negative compilation tests, and positive compilation (smoke) tests for records
* @library /lib/combo /tools/lib /tools/javac/lib
- * @enablePreview
* @modules
* jdk.compiler/com.sun.tools.javac.api
* jdk.compiler/com.sun.tools.javac.code
* jdk.compiler/com.sun.tools.javac.util
- * java.base/jdk.internal.classfile.impl
* @build JavacTestingAbstractProcessor
* @run junit/othervm -DuseAP=false RecordCompilationTests
* @run junit/othervm -DuseAP=true RecordCompilationTests
diff --git a/test/langtools/tools/javac/records/RecordsBinaryCompatibilityTests.java b/test/langtools/tools/javac/records/RecordsBinaryCompatibilityTests.java
index fd1304dfb9e..10ed2809bd0 100644
--- a/test/langtools/tools/javac/records/RecordsBinaryCompatibilityTests.java
+++ b/test/langtools/tools/javac/records/RecordsBinaryCompatibilityTests.java
@@ -25,12 +25,10 @@
* @test
* @summary test binary compatibility rules for record classes
* @library /tools/lib
- * @enablePreview
* @modules jdk.compiler/com.sun.tools.javac.api
* jdk.compiler/com.sun.tools.javac.main
* jdk.compiler/com.sun.tools.javac.util
* jdk.compiler/com.sun.tools.javac.code
- * java.base/jdk.internal.classfile.impl
* @build toolbox.ToolBox toolbox.JavacTask
* @run main RecordsBinaryCompatibilityTests
*/
diff --git a/test/langtools/tools/javac/records/recordComponent/RecordComponentTypeTest.java b/test/langtools/tools/javac/records/recordComponent/RecordComponentTypeTest.java
index 015dc805eea..f7550cb5339 100644
--- a/test/langtools/tools/javac/records/recordComponent/RecordComponentTypeTest.java
+++ b/test/langtools/tools/javac/records/recordComponent/RecordComponentTypeTest.java
@@ -26,10 +26,8 @@
* @bug 8273408
* @summary The compiler shouldn't crash when record component uses the class generated by the annotation processor.
* @library /tools/lib
- * @enablePreview
* @modules jdk.compiler/com.sun.tools.javac.api
* jdk.compiler/com.sun.tools.javac.main
- * java.base/jdk.internal.classfile.impl
* @compile GenerateTypeProcessor.java
* @run main RecordComponentTypeTest
*/
diff --git a/test/langtools/tools/javac/recovery/AnnotationRecovery.java b/test/langtools/tools/javac/recovery/AnnotationRecovery.java
index d9b9854f021..1ef98901ddc 100644
--- a/test/langtools/tools/javac/recovery/AnnotationRecovery.java
+++ b/test/langtools/tools/javac/recovery/AnnotationRecovery.java
@@ -26,10 +26,8 @@
* @bug 8270139
* @summary Verify error recovery w.r.t. annotations
* @library /tools/lib
- * @enablePreview
* @modules jdk.compiler/com.sun.tools.javac.api
* jdk.compiler/com.sun.tools.javac.main
- * java.base/jdk.internal.classfile.impl
* @build toolbox.ToolBox toolbox.JavacTask
* @run main AnnotationRecovery
*/
diff --git a/test/langtools/tools/javac/recovery/AttrRecovery.java b/test/langtools/tools/javac/recovery/AttrRecovery.java
index 19325420af7..db679915e08 100644
--- a/test/langtools/tools/javac/recovery/AttrRecovery.java
+++ b/test/langtools/tools/javac/recovery/AttrRecovery.java
@@ -26,10 +26,8 @@
* @bug 8301580 8322159 8333107 8332230 8338678
* @summary Verify error recovery w.r.t. Attr
* @library /tools/lib
- * @enablePreview
* @modules jdk.compiler/com.sun.tools.javac.api
* jdk.compiler/com.sun.tools.javac.main
- * java.base/jdk.internal.classfile.impl
* @build toolbox.ToolBox toolbox.JavacTask
* @run main AttrRecovery
*/
diff --git a/test/langtools/tools/javac/recovery/FlowRecovery.java b/test/langtools/tools/javac/recovery/FlowRecovery.java
index 930f230222b..2597e7fe51e 100644
--- a/test/langtools/tools/javac/recovery/FlowRecovery.java
+++ b/test/langtools/tools/javac/recovery/FlowRecovery.java
@@ -26,10 +26,8 @@
* @bug 8331212
* @summary Verify error recovery w.r.t. Flow
* @library /tools/lib
- * @enablePreview
* @modules jdk.compiler/com.sun.tools.javac.api
* jdk.compiler/com.sun.tools.javac.main
- * java.base/jdk.internal.classfile.impl
* @build toolbox.ToolBox toolbox.JavacTask
* @run main FlowRecovery
*/
diff --git a/test/langtools/tools/javac/recovery/LambdaRecovery.java b/test/langtools/tools/javac/recovery/LambdaRecovery.java
index d64ae573ace..cbf8c540c79 100644
--- a/test/langtools/tools/javac/recovery/LambdaRecovery.java
+++ b/test/langtools/tools/javac/recovery/LambdaRecovery.java
@@ -26,10 +26,8 @@
* @bug 8297974
* @summary Verify error recovery w.r.t. lambdas
* @library /tools/lib
- * @enablePreview
* @modules jdk.compiler/com.sun.tools.javac.api
* jdk.compiler/com.sun.tools.javac.main
- * java.base/jdk.internal.classfile.impl
* @build toolbox.ToolBox toolbox.JavacTask
* @run main LambdaRecovery
*/
diff --git a/test/langtools/tools/javac/recovery/MethodModifiers.java b/test/langtools/tools/javac/recovery/MethodModifiers.java
index 893c65f8cb0..a8220114700 100644
--- a/test/langtools/tools/javac/recovery/MethodModifiers.java
+++ b/test/langtools/tools/javac/recovery/MethodModifiers.java
@@ -26,10 +26,8 @@
* @bug 8292755
* @summary Verify error recovery related to method modifiers.
* @library /tools/lib
- * @enablePreview
* @modules jdk.compiler/com.sun.tools.javac.api
* jdk.compiler/com.sun.tools.javac.main
- * java.base/jdk.internal.classfile.impl
* @build toolbox.ToolBox toolbox.JavacTask
* @run main MethodModifiers
*/
diff --git a/test/langtools/tools/javac/resolve/NoObjectToString.java b/test/langtools/tools/javac/resolve/NoObjectToString.java
index 56f574bbbbe..dd743bd7784 100644
--- a/test/langtools/tools/javac/resolve/NoObjectToString.java
+++ b/test/langtools/tools/javac/resolve/NoObjectToString.java
@@ -25,7 +25,6 @@
* @test
* @bug 8272564
* @summary Correct resolution of toString() (and other similar calls) on interfaces
- * @enablePreview
* @compile NoObjectToString.java
* @run main NoObjectToString
*/
diff --git a/test/langtools/tools/javac/sealed/BinaryCompatibilityTests.java b/test/langtools/tools/javac/sealed/BinaryCompatibilityTests.java
index 2d3ce1821d2..e505f2a291a 100644
--- a/test/langtools/tools/javac/sealed/BinaryCompatibilityTests.java
+++ b/test/langtools/tools/javac/sealed/BinaryCompatibilityTests.java
@@ -25,12 +25,10 @@
* @test
* @summary test binary compatibility rules for sealed classes
* @library /tools/lib
- * @enablePreview
* @modules jdk.compiler/com.sun.tools.javac.api
* jdk.compiler/com.sun.tools.javac.main
* jdk.compiler/com.sun.tools.javac.util
* jdk.compiler/com.sun.tools.javac.code
- * java.base/jdk.internal.classfile.impl
* @build toolbox.ToolBox toolbox.JavacTask
* @run main BinaryCompatibilityTests
*/
diff --git a/test/langtools/tools/javac/sealed/CheckSubtypesOfSealedTest.java b/test/langtools/tools/javac/sealed/CheckSubtypesOfSealedTest.java
index 0f9634423ec..f0f27470aef 100644
--- a/test/langtools/tools/javac/sealed/CheckSubtypesOfSealedTest.java
+++ b/test/langtools/tools/javac/sealed/CheckSubtypesOfSealedTest.java
@@ -25,9 +25,7 @@
* @test
* @summary check subtypes of sealed classes
* @library /tools/lib /tools/javac/lib /tools/javac/classfiles/attributes/lib
- * @enablePreview
- * @modules java.base/jdk.internal.classfile.impl
- * jdk.compiler/com.sun.tools.javac.code
+ * @modules jdk.compiler/com.sun.tools.javac.code
* jdk.compiler/com.sun.tools.javac.api
* jdk.compiler/com.sun.tools.javac.main
* jdk.compiler/com.sun.tools.javac.util
diff --git a/test/langtools/tools/javac/sealed/SealedDiffConfigurationsTest.java b/test/langtools/tools/javac/sealed/SealedDiffConfigurationsTest.java
index 6cec46ef2d1..f2c40422edd 100644
--- a/test/langtools/tools/javac/sealed/SealedDiffConfigurationsTest.java
+++ b/test/langtools/tools/javac/sealed/SealedDiffConfigurationsTest.java
@@ -25,12 +25,10 @@
* @test 8247352 8293348
* @summary test different configurations of sealed classes, same compilation unit, diff pkg or mdl, etc
* @library /tools/lib
- * @enablePreview
* @modules jdk.compiler/com.sun.tools.javac.api
* jdk.compiler/com.sun.tools.javac.main
* jdk.compiler/com.sun.tools.javac.util
* jdk.compiler/com.sun.tools.javac.code
- * java.base/jdk.internal.classfile.impl
* @build toolbox.ToolBox toolbox.JavacTask
* @run main SealedDiffConfigurationsTest
*/
diff --git a/test/langtools/tools/javac/sym/ElementStructureTest.java b/test/langtools/tools/javac/sym/ElementStructureTest.java
index 8e46863279a..7a5db50c06a 100644
--- a/test/langtools/tools/javac/sym/ElementStructureTest.java
+++ b/test/langtools/tools/javac/sym/ElementStructureTest.java
@@ -21,18 +21,16 @@
* questions.
*/
-/**
+/*
* @test
* @bug 8072480 8203814
* @summary Check the platform classpath contains the correct elements.
* @library /tools/lib
- * @enablePreview
* @modules jdk.compiler/com.sun.tools.javac.code
* jdk.compiler/com.sun.tools.javac.api
* jdk.compiler/com.sun.tools.javac.main
* jdk.compiler/com.sun.tools.javac.platform
* jdk.compiler/com.sun.tools.javac.util
- * java.base/jdk.internal.classfile.impl
* jdk.jdeps/com.sun.tools.javap
* @build toolbox.ToolBox ElementStructureTest
* @run main ElementStructureTest
diff --git a/test/langtools/tools/javac/varargs/6199075/T6199075.java b/test/langtools/tools/javac/varargs/6199075/T6199075.java
index 6e77280eea5..3b90295cb5e 100644
--- a/test/langtools/tools/javac/varargs/6199075/T6199075.java
+++ b/test/langtools/tools/javac/varargs/6199075/T6199075.java
@@ -28,9 +28,7 @@
* @summary Unambiguous varargs method calls flagged as ambiguous
* @author mcimadamore
*
- * @enablePreview
- * @modules java.base/jdk.internal.classfile.impl
- * jdk.compiler/com.sun.tools.javac.api
+ * @modules jdk.compiler/com.sun.tools.javac.api
* jdk.compiler/com.sun.tools.javac.file
* jdk.compiler/com.sun.tools.javac.util
*/
diff --git a/test/langtools/tools/javac/varargs/7042566/T7042566.java b/test/langtools/tools/javac/varargs/7042566/T7042566.java
index 41c8e9609ca..b2b37c9d573 100644
--- a/test/langtools/tools/javac/varargs/7042566/T7042566.java
+++ b/test/langtools/tools/javac/varargs/7042566/T7042566.java
@@ -27,9 +27,7 @@
* @summary Unambiguous varargs method calls flagged as ambiguous
* temporarily workaround combo tests are causing time out in several platforms
* @library /tools/javac/lib
- * @enablePreview
- * @modules java.base/jdk.internal.classfile.impl
- * jdk.compiler/com.sun.tools.javac.api
+ * @modules jdk.compiler/com.sun.tools.javac.api
* jdk.compiler/com.sun.tools.javac.file
* jdk.compiler/com.sun.tools.javac.util
* @build combo.ComboTestHelper
diff --git a/test/langtools/tools/javap/T6716452.java b/test/langtools/tools/javap/T6716452.java
index 20c382918c3..c2f219a4597 100644
--- a/test/langtools/tools/javap/T6716452.java
+++ b/test/langtools/tools/javap/T6716452.java
@@ -24,7 +24,6 @@
/*
* @test 6716452
* @summary need a method to get an index of an attribute
- * @enablePreview
*/
import java.io.*;
diff --git a/test/langtools/tools/javap/TestClassNameWarning.java b/test/langtools/tools/javap/TestClassNameWarning.java
index 3412f8d290f..bed3c4a2cc3 100644
--- a/test/langtools/tools/javap/TestClassNameWarning.java
+++ b/test/langtools/tools/javap/TestClassNameWarning.java
@@ -26,7 +26,6 @@
* @bug 8170708
* @summary javap -m cannot read a module-info.class
* @library /tools/lib
- * @enablePreview
* @modules
* jdk.compiler/com.sun.tools.javac.api
* jdk.compiler/com.sun.tools.javac.main
diff --git a/test/langtools/tools/javap/UndefinedAccessFlagTest.java b/test/langtools/tools/javap/UndefinedAccessFlagTest.java
index 822c9e20f35..ab63dbddce8 100644
--- a/test/langtools/tools/javap/UndefinedAccessFlagTest.java
+++ b/test/langtools/tools/javap/UndefinedAccessFlagTest.java
@@ -26,7 +26,6 @@
* @summary javap should not fail if reserved access flag bits are set to 1
* @library /tools/lib
* @modules jdk.jdeps/com.sun.tools.javap
- * @enablePreview
* @run junit UndefinedAccessFlagTest
*/
diff --git a/test/langtools/tools/javap/VerificationTest.java b/test/langtools/tools/javap/VerificationTest.java
index 7caec462f16..9d9f593bc0d 100644
--- a/test/langtools/tools/javap/VerificationTest.java
+++ b/test/langtools/tools/javap/VerificationTest.java
@@ -24,7 +24,6 @@
/*
* @test
* @bug 8182774
- * @enablePreview
* @summary test on class with a verification error
* @modules jdk.jdeps/com.sun.tools.javap
*/
diff --git a/test/langtools/tools/javap/classfile/6888367/T6888367.java b/test/langtools/tools/javap/classfile/6888367/T6888367.java
index 3e3e3adcd7a..2491398a70e 100644
--- a/test/langtools/tools/javap/classfile/6888367/T6888367.java
+++ b/test/langtools/tools/javap/classfile/6888367/T6888367.java
@@ -35,8 +35,6 @@
* @test
* @bug 6888367
* @summary classfile library parses signature attributes incorrectly
- * @enablePreview
- * @modules java.base/jdk.internal.classfile.impl
*/
/*
diff --git a/test/langtools/tools/javap/classfile/T6887895.java b/test/langtools/tools/javap/classfile/T6887895.java
index fdc72395cad..b6c23a2d40e 100644
--- a/test/langtools/tools/javap/classfile/T6887895.java
+++ b/test/langtools/tools/javap/classfile/T6887895.java
@@ -25,7 +25,6 @@
* @test
* @bug 6887895
* @summary test getting constantpool elements' basename through asInternalName() API
- * @enablePreview
*/
import java.io.*;
diff --git a/test/langtools/tools/javap/classfile/deps/T6907575.java b/test/langtools/tools/javap/classfile/deps/T6907575.java
index 49019d4f870..9bcd16111d2 100644
--- a/test/langtools/tools/javap/classfile/deps/T6907575.java
+++ b/test/langtools/tools/javap/classfile/deps/T6907575.java
@@ -27,7 +27,6 @@
* @modules jdk.jdeps/com.sun.tools.jdeps
* jdk.compiler/com.sun.tools.javac.file
* jdk.compiler/com.sun.tools.javac.util
- * @enablePreview
* @build GetDeps p.C1
* @run main T6907575
*/
diff --git a/test/langtools/tools/javap/typeAnnotations/JSR175Annotations.java b/test/langtools/tools/javap/typeAnnotations/JSR175Annotations.java
index 1f5b2f43958..540d78acba8 100644
--- a/test/langtools/tools/javap/typeAnnotations/JSR175Annotations.java
+++ b/test/langtools/tools/javap/typeAnnotations/JSR175Annotations.java
@@ -30,7 +30,6 @@
* @test JSR175Annotations
* @bug 6843077
* @summary test that only type annotations are recorded as such in classfile
- * @enablePreview
*/
public class JSR175Annotations {
diff --git a/test/langtools/tools/javap/typeAnnotations/NewArray.java b/test/langtools/tools/javap/typeAnnotations/NewArray.java
index cf08baf2955..05760d6a925 100644
--- a/test/langtools/tools/javap/typeAnnotations/NewArray.java
+++ b/test/langtools/tools/javap/typeAnnotations/NewArray.java
@@ -29,7 +29,6 @@
* @test NewArray
* @bug 6843077
* @summary Test type annotations on local array are in method's code attribute.
- * @enablePreview
*/
public class NewArray {
diff --git a/test/langtools/tools/javap/typeAnnotations/Presence.java b/test/langtools/tools/javap/typeAnnotations/Presence.java
index 2fb488e705e..5e1b2a05dca 100644
--- a/test/langtools/tools/javap/typeAnnotations/Presence.java
+++ b/test/langtools/tools/javap/typeAnnotations/Presence.java
@@ -30,7 +30,6 @@
* @test Presence
* @bug 6843077
* @summary test that all type annotations are present in the classfile
- * @enablePreview
*/
public class Presence {
diff --git a/test/langtools/tools/javap/typeAnnotations/PresenceInner.java b/test/langtools/tools/javap/typeAnnotations/PresenceInner.java
index ccb79534616..d0cedc42db6 100644
--- a/test/langtools/tools/javap/typeAnnotations/PresenceInner.java
+++ b/test/langtools/tools/javap/typeAnnotations/PresenceInner.java
@@ -29,7 +29,6 @@
* @test PresenceInner
* @bug 6843077
* @summary test that annotations in inner types count only once
- * @enablePreview
*/
public class PresenceInner {
diff --git a/test/langtools/tools/javap/typeAnnotations/TypeCasts.java b/test/langtools/tools/javap/typeAnnotations/TypeCasts.java
index c8ee0fde965..8889d7e6db5 100644
--- a/test/langtools/tools/javap/typeAnnotations/TypeCasts.java
+++ b/test/langtools/tools/javap/typeAnnotations/TypeCasts.java
@@ -30,7 +30,6 @@
* @bug 6843077
* @summary test that typecasts annotation are emitted if only the cast
* expression is optimized away
- * @enablePreview
*/
public class TypeCasts {
diff --git a/test/langtools/tools/javap/typeAnnotations/Visibility.java b/test/langtools/tools/javap/typeAnnotations/Visibility.java
index ebffbf9176d..48bfbed343e 100644
--- a/test/langtools/tools/javap/typeAnnotations/Visibility.java
+++ b/test/langtools/tools/javap/typeAnnotations/Visibility.java
@@ -30,7 +30,6 @@
* @test Visibility
* @bug 6843077
* @summary test that type annotations are recorded in the classfile
- * @enablePreview
*/
public class Visibility {
diff --git a/test/langtools/tools/javap/typeAnnotations/Wildcards.java b/test/langtools/tools/javap/typeAnnotations/Wildcards.java
index 6bbabebdd37..a4e9b0609e8 100644
--- a/test/langtools/tools/javap/typeAnnotations/Wildcards.java
+++ b/test/langtools/tools/javap/typeAnnotations/Wildcards.java
@@ -29,7 +29,6 @@
* @test Wildcards
* @bug 6843077
* @summary test that annotations target wildcards get emitted to classfile
- * @enablePreview
*/
public class Wildcards {
public static void main(String[] args) throws Exception {
diff --git a/test/micro/org/openjdk/bench/java/lang/classfile/TypeKindBench.java b/test/micro/org/openjdk/bench/java/lang/classfile/TypeKindBench.java
index 43d94f0385a..bf66fb5220b 100644
--- a/test/micro/org/openjdk/bench/java/lang/classfile/TypeKindBench.java
+++ b/test/micro/org/openjdk/bench/java/lang/classfile/TypeKindBench.java
@@ -50,7 +50,7 @@
@OutputTimeUnit(TimeUnit.NANOSECONDS)
@Warmup(iterations = 3, time = 2)
@Measurement(iterations = 6, time = 1)
-@Fork(jvmArgs = "--enable-preview", value = 1)
+@Fork(value = 1)
@State(Scope.Thread)
public class TypeKindBench {
diff --git a/test/micro/org/openjdk/bench/java/lang/classfile/Utf8EntryWriteTo.java b/test/micro/org/openjdk/bench/java/lang/classfile/Utf8EntryWriteTo.java
index db27d318699..101b7e46567 100644
--- a/test/micro/org/openjdk/bench/java/lang/classfile/Utf8EntryWriteTo.java
+++ b/test/micro/org/openjdk/bench/java/lang/classfile/Utf8EntryWriteTo.java
@@ -56,7 +56,7 @@
@OutputTimeUnit(TimeUnit.NANOSECONDS)
@Warmup(iterations = 1, time = 2)
@Measurement(iterations = 3, time = 1)
-@Fork(jvmArgs = "--enable-preview", value = 3)
+@Fork(value = 3)
@State(Scope.Thread)
public class Utf8EntryWriteTo {
static final ClassDesc STRING_BUILDER = ClassDesc.ofDescriptor("Ljava/lang/StringBuilder;");
diff --git a/test/micro/org/openjdk/bench/java/lang/invoke/LazyStaticColdStart.java b/test/micro/org/openjdk/bench/java/lang/invoke/LazyStaticColdStart.java
index 49a77d9539e..a28e8c82876 100644
--- a/test/micro/org/openjdk/bench/java/lang/invoke/LazyStaticColdStart.java
+++ b/test/micro/org/openjdk/bench/java/lang/invoke/LazyStaticColdStart.java
@@ -52,9 +52,7 @@
@BenchmarkMode(Mode.SingleShotTime)
@OutputTimeUnit(TimeUnit.MICROSECONDS)
@State(Scope.Thread)
-@Fork(value = 10, warmups = 5, jvmArgs = {
- "--enable-preview"
-})
+@Fork(value = 10, warmups = 5)
public class LazyStaticColdStart {
private static final MethodHandles.Lookup LOOKUP = MethodHandles.lookup();
diff --git a/test/micro/org/openjdk/bench/jdk/classfile/AbstractCorpusBenchmark.java b/test/micro/org/openjdk/bench/jdk/classfile/AbstractCorpusBenchmark.java
index 685f73e64ce..51ee5743f9b 100644
--- a/test/micro/org/openjdk/bench/jdk/classfile/AbstractCorpusBenchmark.java
+++ b/test/micro/org/openjdk/bench/jdk/classfile/AbstractCorpusBenchmark.java
@@ -46,7 +46,6 @@
@Fork(value = 1, jvmArgs = {
"--add-exports", "java.base/jdk.internal.org.objectweb.asm=ALL-UNNAMED",
"--add-exports", "java.base/jdk.internal.org.objectweb.asm.tree=ALL-UNNAMED",
- "--enable-preview",
"--add-exports", "java.base/jdk.internal.classfile.components=ALL-UNNAMED",
"--add-exports", "java.base/jdk.internal.classfile.impl=ALL-UNNAMED"})
@State(Scope.Benchmark)
diff --git a/test/micro/org/openjdk/bench/jdk/classfile/ClassfileBenchmark.java b/test/micro/org/openjdk/bench/jdk/classfile/ClassfileBenchmark.java
index ecd671feaac..073d87ffdf4 100644
--- a/test/micro/org/openjdk/bench/jdk/classfile/ClassfileBenchmark.java
+++ b/test/micro/org/openjdk/bench/jdk/classfile/ClassfileBenchmark.java
@@ -50,9 +50,7 @@
*/
@Warmup(iterations = 3)
@Measurement(iterations = 5)
-@Fork(value = 1, jvmArgs = {
- "--enable-preview"})
-
+@Fork(value = 1)
@State(Scope.Benchmark)
public class ClassfileBenchmark {
private byte[] benchBytes;
diff --git a/test/micro/org/openjdk/bench/jdk/classfile/CodeAttributeTools.java b/test/micro/org/openjdk/bench/jdk/classfile/CodeAttributeTools.java
index 877a36e3864..f16535ba3ae 100644
--- a/test/micro/org/openjdk/bench/jdk/classfile/CodeAttributeTools.java
+++ b/test/micro/org/openjdk/bench/jdk/classfile/CodeAttributeTools.java
@@ -56,7 +56,6 @@
@BenchmarkMode(Mode.Throughput)
@State(Scope.Benchmark)
@Fork(value = 1, jvmArgs = {
- "--enable-preview",
"--add-exports", "java.base/jdk.internal.classfile.impl=ALL-UNNAMED"})
@Warmup(iterations = 2)
@Measurement(iterations = 8)
diff --git a/test/micro/org/openjdk/bench/jdk/classfile/ConstantPoolBuildingClassEntry.java b/test/micro/org/openjdk/bench/jdk/classfile/ConstantPoolBuildingClassEntry.java
index afb586dabe7..bc9d334ad35 100644
--- a/test/micro/org/openjdk/bench/jdk/classfile/ConstantPoolBuildingClassEntry.java
+++ b/test/micro/org/openjdk/bench/jdk/classfile/ConstantPoolBuildingClassEntry.java
@@ -43,7 +43,7 @@
@Measurement(iterations = 5)
@OutputTimeUnit(TimeUnit.MILLISECONDS)
@BenchmarkMode(Mode.Throughput)
-@Fork(value = 1, jvmArgs = {"--enable-preview"})
+@Fork(value = 1)
@State(Scope.Benchmark)
public class ConstantPoolBuildingClassEntry {
// JDK-8338546
diff --git a/test/micro/org/openjdk/bench/jdk/classfile/RebuildMethodBodies.java b/test/micro/org/openjdk/bench/jdk/classfile/RebuildMethodBodies.java
index f6542983e13..9b4dae2da5b 100644
--- a/test/micro/org/openjdk/bench/jdk/classfile/RebuildMethodBodies.java
+++ b/test/micro/org/openjdk/bench/jdk/classfile/RebuildMethodBodies.java
@@ -37,8 +37,7 @@
@BenchmarkMode(Mode.Throughput)
@State(Scope.Benchmark)
-@Fork(value = 1, jvmArgs = {
- "--enable-preview"})
+@Fork(value = 1)
@Warmup(iterations = 2)
@Measurement(iterations = 4)
public class RebuildMethodBodies {
diff --git a/test/micro/org/openjdk/bench/jdk/classfile/RepeatedModelTraversal.java b/test/micro/org/openjdk/bench/jdk/classfile/RepeatedModelTraversal.java
index f8f29036545..e96e322c59d 100644
--- a/test/micro/org/openjdk/bench/jdk/classfile/RepeatedModelTraversal.java
+++ b/test/micro/org/openjdk/bench/jdk/classfile/RepeatedModelTraversal.java
@@ -37,8 +37,7 @@
@BenchmarkMode(Mode.Throughput)
@State(Scope.Benchmark)
@Fork(value = 1, jvmArgs = {
- "--add-exports", "java.base/jdk.internal.classfile.components=ALL-UNNAMED",
- "--enable-preview"})
+ "--add-exports", "java.base/jdk.internal.classfile.components=ALL-UNNAMED"})
@Warmup(iterations = 3)
@Measurement(iterations = 4)
public class RepeatedModelTraversal {
diff --git a/test/micro/org/openjdk/bench/jdk/classfile/Write.java b/test/micro/org/openjdk/bench/jdk/classfile/Write.java
index 19dfabbdce8..ffd5b8f1c5e 100644
--- a/test/micro/org/openjdk/bench/jdk/classfile/Write.java
+++ b/test/micro/org/openjdk/bench/jdk/classfile/Write.java
@@ -59,7 +59,6 @@
@Fork(value = 1, jvmArgs = {
"--add-exports", "java.base/jdk.internal.org.objectweb.asm=ALL-UNNAMED",
"--add-exports", "java.base/jdk.internal.org.objectweb.asm.tree=ALL-UNNAMED",
- "--enable-preview",
"--add-exports", "java.base/jdk.internal.classfile.impl=ALL-UNNAMED"})
public class Write {
static final int REPEATS = 40;
From 573bcb61809cbd98ec52d159d0c8e030e4a8e3f5 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Hannes=20Walln=C3=B6fer?=
Date: Fri, 6 Dec 2024 16:39:08 +0000
Subject: [PATCH 17/89] 8345664: Use simple parameter type names in @link and
@see tags
Reviewed-by: liach
---
.../doclets/formats/html/taglets/LinkTaglet.java | 2 +-
.../doclet/testLinkTaglet/TestLinkTaglet.java | 16 ++++++++++++++--
.../testLinkTaglet/TestLinkTagletWithModule.java | 6 +++---
.../jdk/javadoc/doclet/testLinkTaglet/pkg/C.java | 3 ++-
.../testNestedGenerics/TestNestedGenerics.java | 7 +++----
.../doclet/testSeeTag/TestSeeTagWithModule.java | 10 +++++-----
6 files changed, 28 insertions(+), 16 deletions(-)
diff --git a/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/taglets/LinkTaglet.java b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/taglets/LinkTaglet.java
index c171e10132a..69cabd5427d 100644
--- a/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/taglets/LinkTaglet.java
+++ b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/taglets/LinkTaglet.java
@@ -271,7 +271,7 @@ Content linkSeeReferenceOutput(Element holder,
}
if (utils.isExecutableElement(refMem)) {
if (refMemName.indexOf('(') < 0) {
- refMemName += utils.makeSignature((ExecutableElement) refMem, null, true);
+ refMemName += utils.makeSignature((ExecutableElement) refMem, null, false, true);
}
if (overriddenMethod != null) {
// The method to actually link.
diff --git a/test/langtools/jdk/javadoc/doclet/testLinkTaglet/TestLinkTaglet.java b/test/langtools/jdk/javadoc/doclet/testLinkTaglet/TestLinkTaglet.java
index 54faadcee1e..422b0fcddc8 100644
--- a/test/langtools/jdk/javadoc/doclet/testLinkTaglet/TestLinkTaglet.java
+++ b/test/langtools/jdk/javadoc/doclet/testLinkTaglet/TestLinkTaglet.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2004, 2022, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2004, 2024, 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
@@ -24,7 +24,7 @@
/*
* @test
* @bug 4732864 6280605 7064544 8014636 8016328 8025633 8071982 8182765
- * 8274781
+ * 8274781 8345664
* @summary Make sure that you can link from one member to another using
* non-qualified name, furthermore, ensure the right one is linked.
* @library ../../lib
@@ -50,6 +50,17 @@ public void test() {
"pkg", testSrc("checkPkg/B.java"));
checkExit(Exit.OK);
+ checkOutput("pkg/package-summary.html", true,
+ """
+ Qualified Link: C.InnerC.
+ Unqualified Link1: C.InnerC.
+ Unqualified Link2: C.InnerC.
+ Qualified Link: C.method(pkg.\
+ C.InnerC, pkg.C.InnerC2).
+ Unqualified Link: C.method(C.InnerC, C.InnerC2).
+ Unqualified Link: C.method(InnerC, InnerC2).
+ Link w/o Signature: C.method(C.InnerC, C.InnerC2).
+ Package Link: pkg. """);
checkOutput("pkg/C.html", true,
"""
Qualified Link: C.InnerC.
@@ -59,6 +70,7 @@ public void test() {
C.InnerC, pkg.C.InnerC2).
Unqualified Link: method(C.InnerC, C.InnerC2).
Unqualified Link: method(InnerC, InnerC2).
+ Link w/o Signature: method(C.InnerC, C.InnerC2).
Package Link: pkg. """);
checkOutput("pkg/C.InnerC.html", true,
diff --git a/test/langtools/jdk/javadoc/doclet/testLinkTaglet/TestLinkTagletWithModule.java b/test/langtools/jdk/javadoc/doclet/testLinkTaglet/TestLinkTagletWithModule.java
index 3adfe661965..86d678fbaa5 100644
--- a/test/langtools/jdk/javadoc/doclet/testLinkTaglet/TestLinkTagletWithModule.java
+++ b/test/langtools/jdk/javadoc/doclet/testLinkTaglet/TestLinkTagletWithModule.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2020, 2022, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2020, 2024, 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
@@ -76,7 +76,7 @@ public void testLinkModuleInternal(Path base) throws Exception {
m1package linkLib
- Lib.method(java.lang.String)
+ Lib.method(String)Lib.method(String)m2m2
@@ -110,7 +110,7 @@ public void testLinkModuleExternal(Path base) throws Exception {
LibLib.method(java.lang.String)
+ interface in com.m1.lib" class="external-link">Lib.method(String)Lib.method(String)m2
diff --git a/test/langtools/jdk/javadoc/doclet/testLinkTaglet/pkg/C.java b/test/langtools/jdk/javadoc/doclet/testLinkTaglet/pkg/C.java
index 97b3f402235..16e788595ff 100644
--- a/test/langtools/jdk/javadoc/doclet/testLinkTaglet/pkg/C.java
+++ b/test/langtools/jdk/javadoc/doclet/testLinkTaglet/pkg/C.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2004, 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2004, 2024, 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
@@ -30,6 +30,7 @@
* Qualified Link: {@link #method(pkg.C.InnerC, pkg.C.InnerC2)}.
* Unqualified Link: {@link #method(C.InnerC, C.InnerC2)}.
* Unqualified Link: {@link #method(InnerC, InnerC2)}.
+ * Link w/o Signature: {@link #method}.
* Package Link: {@link pkg}.
*
*
diff --git a/test/langtools/jdk/javadoc/doclet/testNestedGenerics/TestNestedGenerics.java b/test/langtools/jdk/javadoc/doclet/testNestedGenerics/TestNestedGenerics.java
index b34574a592d..ce5ec77a573 100644
--- a/test/langtools/jdk/javadoc/doclet/testNestedGenerics/TestNestedGenerics.java
+++ b/test/langtools/jdk/javadoc/doclet/testNestedGenerics/TestNestedGenerics.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2011, 2022, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2011, 2024, 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
@@ -23,7 +23,7 @@
/*
* @test
- * @bug 6758050 8025633 8182765
+ * @bug 6758050 8025633 8182765 8345664
* @summary Test HTML output for nested generic types.
* @library ../../lib
* @modules jdk.javadoc/jdk.javadoc.internal.tool
@@ -49,7 +49,6 @@ public void test() {
checkOutput("pkg/NestedGenerics.html", true,
"""
-
""");
}
}
diff --git a/test/langtools/jdk/javadoc/doclet/testSeeTag/TestSeeTagWithModule.java b/test/langtools/jdk/javadoc/doclet/testSeeTag/TestSeeTagWithModule.java
index 6864aca1959..810db378394 100644
--- a/test/langtools/jdk/javadoc/doclet/testSeeTag/TestSeeTagWithModule.java
+++ b/test/langtools/jdk/javadoc/doclet/testSeeTag/TestSeeTagWithModule.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2020, 2022, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2020, 2024, 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
@@ -79,13 +79,13 @@ public void testSeeModuleInternal(Path base) throws Exception {