File tree Expand file tree Collapse file tree 4 files changed +18
-5
lines changed
lang/System/LoggerFinder/internal/BootstrapLogger Expand file tree Collapse file tree 4 files changed +18
-5
lines changed Original file line number Diff line number Diff line change 11/*
2- * Copyright (c) 2014, 2024 , Oracle and/or its affiliates. All rights reserved.
2+ * Copyright (c) 2014, 2025 , Oracle and/or its affiliates. All rights reserved.
33 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
44 *
55 * This code is free software; you can redistribute it and/or modify it
3232import java .lang .System .Logger .Level ;
3333import java .util .concurrent .atomic .AtomicBoolean ;
3434import java .util .List ;
35+ import java .util .Locale ;
3536import java .util .Optional ;
3637import java .util .Set ;
3738import java .util .stream .Collectors ;
@@ -78,6 +79,8 @@ static enum TestCase {
7879 }
7980
8081 public static void main (String [] args ) throws Exception {
82+ Locale savedLocale = Locale .getDefault ();
83+ Locale .setDefault (Locale .US );
8184 if (args == null || args .length == 0 ) {
8285 args = new String [] { TestCase .RUN_AND_WAIT .name () };
8386 }
@@ -351,6 +354,7 @@ public static void main(String[] args) throws Exception {
351354 LogStream .err .println ("Not checking executor termination for " + test );
352355 }
353356 LogStream .err .println (test .name () + ": PASSED" );
357+ Locale .setDefault (savedLocale );
354358 }
355359
356360}
Original file line number Diff line number Diff line change 11/*
2- * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
2+ * Copyright (c) 2013, 2025, Oracle and/or its affiliates. All rights reserved.
33 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
44 *
55 * This code is free software; you can redistribute it and/or modify it
@@ -52,6 +52,7 @@ public class LocalizedLevelName {
5252 public static void main (String args []) throws Exception {
5353 Locale defaultLocale = Locale .getDefault ();
5454 for (int i =0 ; i <namesMap .length ; i += 4 ) {
55+ Locale .setDefault (Locale .US );
5556 final String key = (String ) namesMap [i ];
5657 final Locale locale = (Locale ) namesMap [i +1 ];
5758 final String expectedTranslation = (String ) namesMap [i +2 ];
Original file line number Diff line number Diff line change 11/*
2- * Copyright (c) 2011, 2016 , Oracle and/or its affiliates. All rights reserved.
2+ * Copyright (c) 2011, 2025 , Oracle and/or its affiliates. All rights reserved.
33 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
44 *
55 * This code is free software; you can redistribute it and/or modify it
3030 */
3131
3232import java .io .*;
33+ import java .util .Locale ;
3334import java .util .logging .*;
3435import java .util .regex .*;
3536
@@ -38,6 +39,8 @@ public class SimpleFormatterFormat {
3839 private static final String origFormat = System .getProperty (key );
3940 private static final PrintStream err = System .err ;
4041 public static void main (String [] args ) throws Exception {
42+ Locale savedLocale = Locale .getDefault ();
43+ Locale .setDefault (Locale .US );
4144 try {
4245 File dir = new File (System .getProperty ("user.dir" , "." ));
4346 File log = new File (dir , "simpleformat.txt" );
@@ -53,7 +56,8 @@ public static void main(String[] args) throws Exception {
5356 System .setProperty (key , origFormat );
5457 }
5558 System .setErr (err );
56- }
59+ }
60+ Locale .setDefault (savedLocale );
5761 }
5862
5963 private static String [] loggers = new String [] {
Original file line number Diff line number Diff line change 11/*
2- * Copyright (c) 2010, 2016 , Oracle and/or its affiliates. All rights reserved.
2+ * Copyright (c) 2010, 2025 , Oracle and/or its affiliates. All rights reserved.
33 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
44 *
55 * This code is free software; you can redistribute it and/or modify it
3333 * @run main/othervm SourceClassName
3434 */
3535
36+ import java .util .Locale ;
3637import java .util .logging .*;
3738import java .io .*;
3839import sun .util .logging .PlatformLogger ;
3940
4041public class SourceClassName {
4142 public static void main (String [] args ) throws Exception {
43+ Locale savedLocale = Locale .getDefault ();
44+ Locale .setDefault (Locale .US );
4245 File dir = new File (System .getProperty ("user.dir" , "." ));
4346 File log = new File (dir , "testlog.txt" );
4447 PrintStream logps = new PrintStream (log );
4548 writeLogRecords (logps );
4649 checkLogRecords (log );
50+ Locale .setDefault (savedLocale );
4751 }
4852
4953 private static void writeLogRecords (PrintStream logps ) throws Exception {
You can’t perform that action at this time.
0 commit comments