File tree Expand file tree Collapse file tree 7 files changed +13
-38
lines changed
spi/SelectorProvider/inheritedChannel Expand file tree Collapse file tree 7 files changed +13
-38
lines changed Original file line number Diff line number Diff line change 1
1
/*
2
- * Copyright (c) 2009, 2010 , Oracle and/or its affiliates. All rights reserved.
2
+ * Copyright (c) 2009, 2025 , Oracle and/or its affiliates. All rights reserved.
3
3
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4
4
*
5
5
* This code is free software; you can redistribute it and/or modify it
26
26
* @bug 6823609
27
27
* @summary Selector.select can hangs on Windows for cases where a helper thread
28
28
* becomes redudant but a new helper is immediately needed.
29
+ * @requires (os.family == "windows")
29
30
*/
30
31
31
32
import java .nio .channels .*;
@@ -37,11 +38,6 @@ public class HelperSlowToDie {
37
38
private static volatile boolean done ;
38
39
39
40
public static void main (String [] args ) throws IOException {
40
- if (!System .getProperty ("os.name" ).startsWith ("Windows" )) {
41
- System .out .println ("Test skipped as it verifies a Windows specific bug" );
42
- return ;
43
- }
44
-
45
41
Selector sel = Selector .open ();
46
42
47
43
// register channels
Original file line number Diff line number Diff line change 1
1
/*
2
- * Copyright (c) 2006, 2019 , Oracle and/or its affiliates. All rights reserved.
2
+ * Copyright (c) 2006, 2025 , Oracle and/or its affiliates. All rights reserved.
3
3
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4
4
*
5
5
* This code is free software; you can redistribute it and/or modify it
24
24
/* @test
25
25
* @bug 6285901 6501089
26
26
* @summary Check no data is written to wrong socket channel during async closing.
27
+ * @requires (os.family != "windows")
27
28
*/
28
29
29
30
import java .io .IOException ;
@@ -44,10 +45,6 @@ public class AsyncCloseChannel {
44
45
static int targetPort ;
45
46
46
47
public static void main (String args []) throws Exception {
47
- if (System .getProperty ("os.name" ).startsWith ("Windows" )) {
48
- System .err .println ("WARNING: Still does not work on Windows!" );
49
- return ;
50
- }
51
48
Thread ss = new SensorServer (); ss .start ();
52
49
Thread ts = new TargetServer (); ts .start ();
53
50
Original file line number Diff line number Diff line change 1
1
/*
2
- * Copyright (c) 2007, 2019 , Oracle and/or its affiliates. All rights reserved.
2
+ * Copyright (c) 2007, 2025 , Oracle and/or its affiliates. All rights reserved.
3
3
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4
4
*
5
5
* This code is free software; you can redistribute it and/or modify it
24
24
/*
25
25
* @test
26
26
* @summary Sockets shouldn't be inherited when creating a child process
27
+ * @requires (os.family == "windows")
27
28
*/
28
29
import java .nio .ByteBuffer ;
29
30
import java .nio .channels .*;
@@ -138,9 +139,6 @@ static void start() throws Exception {
138
139
}
139
140
140
141
public static void main (String [] args ) throws Exception {
141
- if (!System .getProperty ("os.name" ).startsWith ("Windows" ))
142
- return ;
143
-
144
142
if (args .length == 0 ) {
145
143
start ();
146
144
} else {
Original file line number Diff line number Diff line change 1
1
/*
2
- * Copyright (c) 2017, 2024 , Oracle and/or its affiliates. All rights reserved.
2
+ * Copyright (c) 2017, 2025 , Oracle and/or its affiliates. All rights reserved.
3
3
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4
4
*
5
5
* This code is free software; you can redistribute it and/or modify it
59
59
60
60
public class InheritedChannelTest {
61
61
62
- private static final String TEST_SRC = System .getProperty ("test.src" );
63
62
private static final String TEST_CLASSPATH = System .getProperty ("test.class.path" );
64
63
private static final String TEST_CLASSES = System .getProperty ("test.classes" );
65
64
66
- private static final String OS_NAME = System .getProperty ("os.name" ).toLowerCase ();
67
-
68
- private static final String ARCH = System .getProperty ("os.arch" );
69
- private static final String OS_ARCH = ARCH .equals ("i386" ) ? "i586" : ARCH ;
70
-
71
65
private static final Path libraryPath
72
66
= Paths .get (System .getProperty ("java.library.path" ));
73
67
Original file line number Diff line number Diff line change 1
1
/*
2
- * Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved.
2
+ * Copyright (c) 2010, 2025, Oracle and/or its affiliates. All rights reserved.
3
3
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4
4
*
5
5
* This code is free software; you can redistribute it and/or modify it
24
24
/* @test
25
25
@bug 6176819
26
26
@summary Check if COMPUND_TEXT charset works as expected
27
+ @requires (os.family != "windows")
27
28
@run main/timeout=1200 TestCOMP
28
29
*/
29
30
35
36
36
37
public class TestCOMP {
37
38
public static void main (String [] argv ) throws CharacterCodingException {
38
- String osName = System .getProperty ("os.name" );
39
- if (osName .startsWith ("Windows" ))
40
- return ;
41
39
try {
42
40
String src =
43
41
"JIS0208\u4eb0 " +
Original file line number Diff line number Diff line change 1
1
/*
2
- * Copyright (c) 2008, 2011 , Oracle and/or its affiliates. All rights reserved.
2
+ * Copyright (c) 2008, 2025 , Oracle and/or its affiliates. All rights reserved.
3
3
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4
4
*
5
5
* This code is free software; you can redistribute it and/or modify it
25
25
* @bug 6808647
26
26
* @summary Checks that a DirectoryStream's iterator returns the expected
27
27
* path when opening a directory by specifying only the drive letter.
28
+ * @requires (os.family == "windows")
28
29
* @library ..
29
30
*/
30
31
35
36
public class DriveLetter {
36
37
37
38
public static void main (String [] args ) throws IOException {
38
- String os = System .getProperty ("os.name" );
39
- if (!os .startsWith ("Windows" )) {
40
- System .out .println ("This is Windows specific test" );
41
- return ;
42
- }
43
39
String here = System .getProperty ("user.dir" );
44
40
if (here .length () < 2 || here .charAt (1 ) != ':' )
45
41
throw new RuntimeException ("Unable to determine drive letter" );
Original file line number Diff line number Diff line change 1
1
/*
2
- * Copyright (c) 2008, 2016 , Oracle and/or its affiliates. All rights reserved.
2
+ * Copyright (c) 2008, 2025 , Oracle and/or its affiliates. All rights reserved.
3
3
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4
4
*
5
5
* This code is free software; you can redistribute it and/or modify it
24
24
/* @test
25
25
* @bug 4313887 6838333
26
26
* @summary Sanity test for JDK-specific FILE_TREE watch event modifier
27
+ * @requires (os.family == "windows")
27
28
* @library ..
28
29
* @modules jdk.unsupported
29
30
*/
@@ -129,11 +130,6 @@ static void doTest(Path top) throws IOException {
129
130
130
131
131
132
public static void main (String [] args ) throws IOException {
132
- if (!System .getProperty ("os.name" ).startsWith ("Windows" )) {
133
- System .out .println ("This is Windows-only test at this time!" );
134
- return ;
135
- }
136
-
137
133
Path dir = TestUtil .createTemporaryDirectory ();
138
134
try {
139
135
doTest (dir );
You can’t perform that action at this time.
0 commit comments