Skip to content

Commit

Permalink
initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
naotoj committed Nov 7, 2024
1 parent d49f210 commit 4255c80
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
3 changes: 3 additions & 0 deletions src/java.base/share/classes/sun/launcher/LauncherHelper.java
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@
import java.util.Properties;
import java.util.ResourceBundle;
import java.util.Set;
import java.util.TimeZone;
import java.util.TreeSet;
import java.util.function.Function;
import java.util.jar.Attributes;
Expand Down Expand Up @@ -318,6 +319,8 @@ private static void printLocale(boolean verbose) {
Locale.getDefault(Category.DISPLAY).getDisplayName());
ostream.println(INDENT + "default format locale = " +
Locale.getDefault(Category.FORMAT).getDisplayName());
ostream.println(INDENT + "default timezone = " +
TimeZone.getDefault().getID());
ostream.println(INDENT + "tzdata version = " +
ZoneInfoFile.getVersion());
if (verbose) {
Expand Down
8 changes: 6 additions & 2 deletions test/jdk/tools/launcher/Settings.java
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2010, 2023, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2010, 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
Expand All @@ -25,7 +25,7 @@

/*
* @test
* @bug 6994753 7123582 8305950 8281658 8310201 8311653
* @bug 6994753 7123582 8305950 8281658 8310201 8311653 8343804
* @summary tests -XshowSettings options
* @modules jdk.compiler
* jdk.zipfs
Expand Down Expand Up @@ -80,6 +80,7 @@ static void checkNotContains(TestResult tr, String str) {
private static final String SYSTEM_SETTINGS = "Operating System Metrics:";
private static final String METRICS_NOT_AVAILABLE_MSG = "No metrics available for this platform";
private static final String STACKSIZE_SETTINGS = "Stack Size:";
private static final String TIMEZONE_SETTINGS = "default timezone";
private static final String TZDATA_SETTINGS = "tzdata version";
private static final String ERR_MSG = "Unrecognized showSettings option:";

Expand All @@ -96,6 +97,7 @@ static void containsAllOptions(TestResult tr) {
checkNotContains(tr, SEC_SUMMARY_PROPS_SETTINGS);
checkContains(tr, SEC_PROVIDER_SETTINGS);
checkContains(tr, SEC_TLS_SETTINGS);
checkContains(tr, TIMEZONE_SETTINGS);
checkContains(tr, TZDATA_SETTINGS);
if (System.getProperty("os.name").contains("Linux")) {
checkContains(tr, SYSTEM_SETTINGS);
Expand All @@ -119,6 +121,7 @@ static void containsDefaultOptions(TestResult tr) {
checkContains(tr, SEC_SUMMARY_PROPS_SETTINGS);
checkContains(tr, SEC_PROVIDER_SETTINGS);
checkContains(tr, SEC_TLS_SETTINGS);
checkContains(tr, TIMEZONE_SETTINGS);
checkContains(tr, TZDATA_SETTINGS);
if (System.getProperty("os.name").contains("Linux")) {
checkContains(tr, SYSTEM_SETTINGS);
Expand Down Expand Up @@ -190,6 +193,7 @@ static void runTestOptionLocale() throws IOException {
checkContains(tr, LOCALE_SETTINGS);
checkContains(tr, AVAILABLE_LOCALES);
checkNotContains(tr, LOCALE_SUMMARY_SETTINGS);
checkContains(tr, TIMEZONE_SETTINGS);
checkContains(tr, TZDATA_SETTINGS);
}

Expand Down

0 comments on commit 4255c80

Please sign in to comment.