mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-28 07:14:30 +02:00
8215165: Improve -Xlog:class+preview message text
Fix up the logging message. Reviewed-by: acorn, lfoltan
This commit is contained in:
parent
019a097385
commit
b564c0c1a9
2 changed files with 3 additions and 2 deletions
|
@ -5733,7 +5733,8 @@ void ClassFileParser::fill_instance_klass(InstanceKlass* ik, bool changed_by_loa
|
||||||
ik->major_version() != JAVA_MIN_SUPPORTED_VERSION &&
|
ik->major_version() != JAVA_MIN_SUPPORTED_VERSION &&
|
||||||
log_is_enabled(Info, class, preview)) {
|
log_is_enabled(Info, class, preview)) {
|
||||||
ResourceMark rm;
|
ResourceMark rm;
|
||||||
log_info(class, preview)("Loading preview feature type %s", ik->external_name());
|
log_info(class, preview)("Loading class %s that depends on preview features (class file version %d.65535)",
|
||||||
|
ik->external_name(), ik->major_version());
|
||||||
}
|
}
|
||||||
|
|
||||||
if (log_is_enabled(Debug, class, resolve)) {
|
if (log_is_enabled(Debug, class, resolve)) {
|
||||||
|
|
|
@ -69,7 +69,7 @@ public class PreviewVersion {
|
||||||
pb = ProcessTools.createJavaProcessBuilder("--enable-preview", "-Xlog:class+preview",
|
pb = ProcessTools.createJavaProcessBuilder("--enable-preview", "-Xlog:class+preview",
|
||||||
"-cp", "." + File.pathSeparator + System.getProperty("test.classes"), "PVTest");
|
"-cp", "." + File.pathSeparator + System.getProperty("test.classes"), "PVTest");
|
||||||
oa = new OutputAnalyzer(pb.start());
|
oa = new OutputAnalyzer(pb.start());
|
||||||
oa.shouldContain("[info][class,preview] Loading preview feature type PVTest");
|
oa.shouldContain("[info][class,preview] Loading class PVTest that depends on preview features");
|
||||||
|
|
||||||
// Subtract 1 from class's major version. The class should fail to load
|
// Subtract 1 from class's major version. The class should fail to load
|
||||||
// because its major_version does not match the JVM current version.
|
// because its major_version does not match the JVM current version.
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue