Skip to content

Commit f7aba61

Browse files
author
duke
committed
Backport b0c131e872f997cb7deadc9b0a87bd76e3a2a83c
1 parent f90566a commit f7aba61

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

test/jdk/java/io/File/createTempFile/SpecialTempFile.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2013, 2023, 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
@@ -36,6 +36,7 @@
3636

3737
import jdk.internal.util.OperatingSystem;
3838
import jdk.internal.util.OSVersion;
39+
import jdk.internal.util.StaticProperty;
3940

4041
public class SpecialTempFile {
4142
private static void test(String name, String[] prefix, String[] suffix,
@@ -108,7 +109,7 @@ public static void main(String[] args) throws Exception {
108109
String[] resvPre = { "LPT1.package.zip", "com7.4.package.zip" };
109110
String[] resvSuf = { ".temp", ".temp" };
110111
boolean exceptionExpected =
111-
!(System.getProperty("os.name").endsWith("11") ||
112+
!(StaticProperty.osName().matches("^.*[11|2025]$") ||
112113
new OSVersion(10, 0).compareTo(OSVersion.current()) > 0);
113114
test("ReservedName", resvPre, resvSuf, exceptionExpected);
114115
}

0 commit comments

Comments
 (0)