Skip to content

Commit caf1f8f

Browse files
committed
8359182: Use @requires instead of SkippedException for MaxPath.java
Backport-of: 5886ef728fc1efe43e90e056c03725c3ee982ad6
1 parent 66ef112 commit caf1f8f

File tree

1 file changed

+1
-8
lines changed

1 file changed

+1
-8
lines changed

test/jdk/java/io/File/MaxPath.java

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -24,21 +24,14 @@
2424
/* @test
2525
@bug 6481955
2626
@summary Path length less than MAX_PATH (260) works on Windows
27-
@library /test/lib
27+
@requires (os.family == "windows")
2828
*/
2929

3030
import java.io.File;
3131
import java.io.IOException;
3232

33-
import jtreg.SkippedException;
34-
3533
public class MaxPath {
3634
public static void main(String[] args) throws Exception {
37-
String osName = System.getProperty("os.name");
38-
if (!osName.startsWith("Windows")) {
39-
throw new SkippedException("This test is run only on Windows");
40-
}
41-
4235
int MAX_PATH = 260;
4336
String dir = new File(".").getAbsolutePath() + "\\";
4437
String padding = "1234567890123456789012345678901234567890012345678900123456789001234567890012345678900123456789001234567890012345678900123456789001234567890012345678900123456789001234567890012345678900123456789001234567890012345678900123456789001234567890012345678900123456789001234567890012345678900123456789001234567890012345678900123456789001234567890";

0 commit comments

Comments
 (0)