Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8360411

[TEST] open/test/jdk/java/io/File/MaxPathLength.java Refactor extract method to encapsulate Windows specific test logic

XMLWordPrintable

    • b08



                // test long paths on windows
                // And these long pathes cannot be handled on Solaris and Mac platforms
        *** REFACTOR extract method this code block to a method testLongPathOnWindows ***

                if (isWindows) {
                    String name = fileName;
                    while (name.length() < MAX_LENGTH) {
                        testLongPath (20, name, false);
                        testLongPath (20, name, true);
                        name = getNextName(name);
                    }
                }
            }

            private static void testLongPathOnWindows () throws Exception {
                if (isWindows) {
                    String name = fileName;
                    while (name.length() < MAX_LENGTH) {
                        testLongPath (20, name, false);
                        testLongPath (20, name, true);
                        name = getNextName(name);
                    }
                }
            }

              dconway Darragh Conway (Inactive)
              msheppar Mark Sheppard
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

                Created:
                Updated:
                Resolved: