|
1 | 1 | /* |
2 | | - * Copyright (c) 2002, 2013, Oracle and/or its affiliates. All rights reserved. |
| 2 | + * Copyright (c) 2002, 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 |
@@ -60,14 +60,7 @@ public static void main(String[] args) throws Exception { |
60 | 60 |
|
61 | 61 | // test long paths on windows |
62 | 62 | // And these long pathes cannot be handled on Solaris and Mac platforms |
63 | | - if (isWindows) { |
64 | | - String name = fileName; |
65 | | - while (name.length() < MAX_LENGTH) { |
66 | | - testLongPath (20, name, false); |
67 | | - testLongPath (20, name, true); |
68 | | - name = getNextName(name); |
69 | | - } |
70 | | - } |
| 63 | + testLongPathOnWindows(); |
71 | 64 | } |
72 | 65 |
|
73 | 66 | private static String getNextName(String fName) { |
@@ -199,4 +192,15 @@ static void testLongPath(int max, String fn, |
199 | 192 | } |
200 | 193 | } |
201 | 194 | } |
| 195 | + |
| 196 | + private static void testLongPathOnWindows () throws Exception { |
| 197 | + if (isWindows) { |
| 198 | + String name = fileName; |
| 199 | + while (name.length() < MAX_LENGTH) { |
| 200 | + testLongPath (20, name, false); |
| 201 | + testLongPath (20, name, true); |
| 202 | + name = getNextName(name); |
| 203 | + } |
| 204 | + } |
| 205 | + } |
202 | 206 | } |
0 commit comments