mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-28 07:14:30 +02:00
8305950: Have -XshowSettings option display tzdata version
Reviewed-by: rriggs
This commit is contained in:
parent
d9052b9466
commit
07f55c5ea2
2 changed files with 9 additions and 3 deletions
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2007, 2022, Oracle and/or its affiliates. All rights reserved.
|
* Copyright (c) 2007, 2023, Oracle and/or its affiliates. All rights reserved.
|
||||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
*
|
*
|
||||||
* This code is free software; you can redistribute it and/or modify it
|
* This code is free software; you can redistribute it and/or modify it
|
||||||
|
@ -83,6 +83,7 @@ import jdk.internal.module.ModuleBootstrap;
|
||||||
import jdk.internal.module.Modules;
|
import jdk.internal.module.Modules;
|
||||||
import jdk.internal.platform.Container;
|
import jdk.internal.platform.Container;
|
||||||
import jdk.internal.platform.Metrics;
|
import jdk.internal.platform.Metrics;
|
||||||
|
import sun.util.calendar.ZoneInfoFile;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* A utility package for the java(1), javaw(1) launchers.
|
* A utility package for the java(1), javaw(1) launchers.
|
||||||
|
@ -280,6 +281,8 @@ public final class LauncherHelper {
|
||||||
Locale.getDefault(Category.DISPLAY).getDisplayName());
|
Locale.getDefault(Category.DISPLAY).getDisplayName());
|
||||||
ostream.println(INDENT + "default format locale = " +
|
ostream.println(INDENT + "default format locale = " +
|
||||||
Locale.getDefault(Category.FORMAT).getDisplayName());
|
Locale.getDefault(Category.FORMAT).getDisplayName());
|
||||||
|
ostream.println(INDENT + "tzdata version = " +
|
||||||
|
ZoneInfoFile.getVersion());
|
||||||
printLocales();
|
printLocales();
|
||||||
ostream.println();
|
ostream.println();
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2010, 2017, Oracle and/or its affiliates. All rights reserved.
|
* Copyright (c) 2010, 2023, Oracle and/or its affiliates. All rights reserved.
|
||||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
*
|
*
|
||||||
* This code is free software; you can redistribute it and/or modify it
|
* This code is free software; you can redistribute it and/or modify it
|
||||||
|
@ -25,7 +25,7 @@ import java.io.IOException;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* @test
|
* @test
|
||||||
* @bug 6994753 7123582
|
* @bug 6994753 7123582 8305950
|
||||||
* @summary tests -XshowSettings options
|
* @summary tests -XshowSettings options
|
||||||
* @modules jdk.compiler
|
* @modules jdk.compiler
|
||||||
* jdk.zipfs
|
* jdk.zipfs
|
||||||
|
@ -69,11 +69,13 @@ public class Settings extends TestHelper {
|
||||||
private static final String LOCALE_SETTINGS = "Locale settings:";
|
private static final String LOCALE_SETTINGS = "Locale settings:";
|
||||||
private static final String SYSTEM_SETTINGS = "Operating System Metrics:";
|
private static final String SYSTEM_SETTINGS = "Operating System Metrics:";
|
||||||
private static final String STACKSIZE_SETTINGS = "Stack Size:";
|
private static final String STACKSIZE_SETTINGS = "Stack Size:";
|
||||||
|
private static final String TZDATA_SETTINGS = "tzdata version";
|
||||||
|
|
||||||
static void containsAllOptions(TestResult tr) {
|
static void containsAllOptions(TestResult tr) {
|
||||||
checkContains(tr, VM_SETTINGS);
|
checkContains(tr, VM_SETTINGS);
|
||||||
checkContains(tr, PROP_SETTINGS);
|
checkContains(tr, PROP_SETTINGS);
|
||||||
checkContains(tr, LOCALE_SETTINGS);
|
checkContains(tr, LOCALE_SETTINGS);
|
||||||
|
checkContains(tr, TZDATA_SETTINGS);
|
||||||
if (System.getProperty("os.name").contains("Linux")) {
|
if (System.getProperty("os.name").contains("Linux")) {
|
||||||
checkContains(tr, SYSTEM_SETTINGS);
|
checkContains(tr, SYSTEM_SETTINGS);
|
||||||
}
|
}
|
||||||
|
@ -139,6 +141,7 @@ public class Settings extends TestHelper {
|
||||||
checkNotContains(tr, VM_SETTINGS);
|
checkNotContains(tr, VM_SETTINGS);
|
||||||
checkNotContains(tr, PROP_SETTINGS);
|
checkNotContains(tr, PROP_SETTINGS);
|
||||||
checkContains(tr, LOCALE_SETTINGS);
|
checkContains(tr, LOCALE_SETTINGS);
|
||||||
|
checkContains(tr, TZDATA_SETTINGS);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void runTestOptionSystem() throws IOException {
|
static void runTestOptionSystem() throws IOException {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue