@@ -196,15 +196,15 @@ private void consumeRemaining(final Iterator<File> iterator) {
196196 }
197197 }
198198
199- private Path createCircularOsSymLink (final String linkName , final String targetName ) throws IOException {
199+ private Path createCircularOsSymbolicLink (final String linkName , final String targetName ) throws IOException {
200200 return Files .createSymbolicLink (Paths .get (linkName ), Paths .get (targetName ));
201201 }
202202
203203 /**
204204 * May throw java.nio.file.FileSystemException: C:\Users\...\FileUtilsTestCase\cycle: A required privilege is not held
205205 * by the client. On Windows, you are fine if you run a terminal with admin karma.
206206 */
207- private void createCircularSymLink (final File file ) throws IOException {
207+ private void createCircularSymbolicLink (final File file ) throws IOException {
208208 assertTrue (file .exists ());
209209 final String linkName = file + "/cycle" ;
210210 final String targetName = file + "/.." ;
@@ -218,7 +218,7 @@ private void createCircularSymLink(final File file) throws IOException {
218218 // On Windows, you are fine if you run a terminal with admin karma.
219219 Files .createSymbolicLink (linkPath , targetPath );
220220 } catch (final UnsupportedOperationException e ) {
221- createCircularOsSymLink (linkName , targetName );
221+ createCircularOsSymbolicLink (linkName , targetName );
222222 }
223223 // Sanity check:
224224 assertTrue (Files .isSymbolicLink (linkPath ), () -> "Expected a sym link here: " + linkName );
@@ -245,7 +245,7 @@ private void createFilesForTestCopyDirectory(final File grandParentDir, final Fi
245245 FileUtils .writeStringToFile (file6 , "File 6 in grandChild2" , "UTF8" );
246246 }
247247
248- private Path createTempSymlinkedRelativeDir () throws IOException {
248+ private Path createTempSymbolicLinkedRelativeDir () throws IOException {
249249 final Path targetDir = tempDirPath .resolve ("subdir" );
250250 final Path symlinkDir = tempDirPath .resolve ("symlinked-dir" );
251251 Files .createDirectory (targetDir );
@@ -404,7 +404,7 @@ public void test_openOutputStream_existsButIsDirectory() {
404404 */
405405 @ Test
406406 public void test_openOutputStream_intoExistingSymlinkedDir () throws Exception {
407- final Path symlinkedDir = createTempSymlinkedRelativeDir ();
407+ final Path symlinkedDir = createTempSymbolicLinkedRelativeDir ();
408408
409409 final File file = symlinkedDir .resolve ("test.txt" ).toFile ();
410410 try (FileOutputStream out = FileUtils .openOutputStream (file )) {
@@ -762,7 +762,7 @@ public void testContentEqualsIgnoreEOL() throws Exception {
762762 * and should not be relied on.
763763 */
764764 @ Test
765- public void testCopyDir_symLink () throws Exception {
765+ public void testCopyDir_SymbolicLink () throws Exception {
766766 // Make a directory
767767 final File realDirectory = new File (tempDirFile , "real_directory" );
768768 realDirectory .mkdir ();
@@ -790,7 +790,7 @@ public void testCopyDir_symLink() throws Exception {
790790 }
791791
792792 @ Test
793- public void testCopyDir_symLinkCycle () throws Exception {
793+ public void testCopyDir_SymbolicLinkCycle () throws Exception {
794794 // Make a directory
795795 final File topDirectory = new File (tempDirFile , "topDirectory" );
796796 topDirectory .mkdir ();
@@ -824,7 +824,7 @@ public void testCopyDir_symLinkCycle() throws Exception {
824824 * Tests IO-807.
825825 */
826826 @ Test
827- public void testCopyDirectory_brokenSymLink () throws IOException {
827+ public void testCopyDirectory_brokenSymbolicLink () throws IOException {
828828 // Make a file
829829 final File sourceDirectory = new File (tempDirFile , "source_directory" );
830830 sourceDirectory .mkdir ();
@@ -859,7 +859,7 @@ public void testCopyDirectory_brokenSymLink() throws IOException {
859859 }
860860
861861 @ Test
862- public void testCopyDirectory_symLink () throws IOException {
862+ public void testCopyDirectory_SymbolicLink () throws IOException {
863863 // Make a file
864864 final File sourceDirectory = new File (tempDirFile , "source_directory" );
865865 sourceDirectory .mkdir ();
@@ -890,7 +890,7 @@ public void testCopyDirectory_symLink() throws IOException {
890890 * to a file outside the copied directory.
891891 */
892892 @ Test
893- public void testCopyDirectory_symLinkExternalFile () throws Exception {
893+ public void testCopyDirectory_SymbolicLinkExternalFile () throws Exception {
894894 // make a file
895895 final File content = new File (tempDirFile , "hello.txt" );
896896 FileUtils .writeStringToFile (content , "HELLO WORLD" , "UTF8" );
@@ -1195,7 +1195,7 @@ public void testCopyDirectoryWithPotentialFalsePartialMatch() throws IOException
11951195 }
11961196
11971197 @ Test
1198- public void testCopyFile_symLink () throws Exception {
1198+ public void testCopyFile_SymbolicLink () throws Exception {
11991199 // Make a file
12001200 final File sourceDirectory = new File (tempDirFile , "source_directory" );
12011201 sourceDirectory .mkdir ();
@@ -1553,19 +1553,19 @@ public void testDeleteDirectoryFailsOnFile() {
15531553 assertThrows (IllegalArgumentException .class , () -> FileUtils .deleteDirectory (testFile1 ));
15541554 }
15551555
1556- @ Test
1557- public void testDeleteDirectoryNoopIfAbsent () {
1558- // Noop on non-existent entry
1559- assertDoesNotThrow (() -> FileUtils .deleteDirectory (new File ("does not exist.nope" )));
1560- }
1561-
15621556 @ Test
15631557 public void testDeleteDirectoryIsSymLink () throws IOException {
1564- final Path symlinkedDir = createTempSymlinkedRelativeDir ();
1558+ final Path symlinkedDir = createTempSymbolicLinkedRelativeDir ();
15651559 FileUtils .deleteDirectory (symlinkedDir .toFile ());
15661560 assertFalse (Files .exists (symlinkedDir ));
15671561 }
15681562
1563+ @ Test
1564+ public void testDeleteDirectoryNoopIfAbsent () {
1565+ // Noop on non-existent entry
1566+ assertDoesNotThrow (() -> FileUtils .deleteDirectory (new File ("does not exist.nope" )));
1567+ }
1568+
15691569 @ Test
15701570 public void testDeleteQuietlyDir () throws IOException {
15711571 final File testDirectory = new File (tempDirFile , "testDeleteQuietlyDir" );
@@ -2889,7 +2889,7 @@ public void testSizeOfDirectory() throws Exception {
28892889 file .mkdir ();
28902890
28912891 // Create a cyclic symlink
2892- createCircularSymLink (file );
2892+ createCircularSymbolicLink (file );
28932893
28942894 assertEquals (TEST_DIRECTORY_SIZE , FileUtils .sizeOfDirectory (file ), "Unexpected directory size" );
28952895 }
@@ -2920,7 +2920,7 @@ public void testSizeOfDirectoryAsBigInteger() throws Exception {
29202920 file .delete ();
29212921 file .mkdir ();
29222922
2923- createCircularSymLink (file );
2923+ createCircularSymbolicLink (file );
29242924
29252925 assertEquals (TEST_DIRECTORY_SIZE_BI , FileUtils .sizeOfDirectoryAsBigInteger (file ), "Unexpected directory size" );
29262926
@@ -3453,7 +3453,7 @@ public void testWriteStringToFileIntoNonExistentSubdir() throws Exception {
34533453 */
34543454 @ Test
34553455 public void testWriteStringToFileIntoSymlinkedDir () throws Exception {
3456- final Path symlinkDir = createTempSymlinkedRelativeDir ();
3456+ final Path symlinkDir = createTempSymbolicLinkedRelativeDir ();
34573457
34583458 final File file = symlinkDir .resolve ("file" ).toFile ();
34593459 FileUtils .writeStringToFile (file , "Hello /u1234" , StandardCharsets .UTF_8 );
0 commit comments