Skip to content

Commit

Permalink
Fix formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
michael-o committed Jul 25, 2022
1 parent cbd1acd commit 5b78029
Showing 1 changed file with 12 additions and 12 deletions.
24 changes: 12 additions & 12 deletions src/test/java/org/apache/maven/shared/utils/io/FileUtilsTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -430,7 +430,7 @@ public void copyFileWithNoFiltersAndNoDestination()
"to.txt"
);

FileUtils.copyFile( from, to, null, ( FileUtils.FilterWrapper[] ) null);
FileUtils.copyFile( from, to, null, (FileUtils.FilterWrapper[]) null );

assertTrue(
"to.txt did not exist so should have been written",
Expand All @@ -454,7 +454,7 @@ public void copyFileWithNoFiltersAndLastModifiedDateOfZeroAndNoDestination()
);

from.setLastModified( 0 );
FileUtils.copyFile( from, to, null, ( FileUtils.FilterWrapper[] ) null);
FileUtils.copyFile( from, to, null, (FileUtils.FilterWrapper[]) null );

assertTrue(
"to.txt did not exist so should have been written",
Expand All @@ -478,7 +478,7 @@ public void copyFileWithNoFiltersAndOutdatedDestination()
"Older content"
);

FileUtils.copyFile( from, to, null, ( FileUtils.FilterWrapper[] ) null);
FileUtils.copyFile( from, to, null, (FileUtils.FilterWrapper[]) null );

assertTrue(
"to.txt was outdated so should have been overwritten",
Expand All @@ -502,7 +502,7 @@ public void copyFileWithNoFiltersAndNewerDestination()
"Older content"
);

FileUtils.copyFile( from, to, null, ( FileUtils.FilterWrapper[] ) null);
FileUtils.copyFile( from, to, null, (FileUtils.FilterWrapper[]) null );

assertTrue(
"to.txt was newer so should have been left alone",
Expand All @@ -526,7 +526,7 @@ public void copyFileWithNoFiltersAndNewerDestinationButForcedOverwrite()
"Older content"
);

FileUtils.copyFile( from, to, null, null, true);
FileUtils.copyFile( from, to, null, null, true );

assertTrue(
"to.txt was newer but the overwrite should have been forced",
Expand Down Expand Up @@ -695,7 +695,7 @@ public Reader getReader( Reader reader )
};
}

private File write( @Nonnull String name, long lastModified, @Nonnull String text) throws IOException
private File write( @Nonnull String name, long lastModified, @Nonnull String text ) throws IOException
{
final File file = new File( tempFolder.getRoot(), name );
try ( final Writer writer = new FileWriter( file ) ) {
Expand Down Expand Up @@ -744,7 +744,7 @@ public void deleteFile()
assertThat( "Check Exist", destination.exists(), is( false ) );
}

@Test(expected = IOException.class)
@Test( expected = IOException.class )
public void deleteFileNofile()
throws Exception
{
Expand Down Expand Up @@ -1035,7 +1035,7 @@ public void fileUtils()
File file1 = new File( tempFolder.getRoot(), "test.txt" );
String filename = file1.getAbsolutePath();

//Create test file on-the-fly (used to be in CVS)
//Create test file on-the-fly
try ( OutputStream out = new java.io.FileOutputStream( file1 ) )
{
out.write( "This is a test".getBytes( "UTF-8" ) );
Expand Down Expand Up @@ -1571,24 +1571,24 @@ public void extensionWindowsNonRootPathOnWindows()
}

@Test
@Ignore("Wait until we can run with assembly 2.5 which will support symlinks properly")
@Ignore( "Wait until we can run with assembly 2.5 which will support symlinks properly" )
public void isASymbolicLink()
throws IOException
{
// This testcase will pass when running under java7 or higher
assumeFalse( Os.isFamily( Os.FAMILY_WINDOWS ) );

File file = new File( "src/test/resources/symlinks/src/symDir" );
assertTrue(FileUtils.isSymbolicLink(file ));
assertTrue( FileUtils.isSymbolicLink( file ) );
}

@Test
@Ignore("Wait until we can run with assembly 2.5 which will support symlinks properly")
@Ignore( "Wait until we can run with assembly 2.5 which will support symlinks properly" )
public void notASymbolicLink()
throws IOException
{
File file = new File( "src/test/resources/symlinks/src/" );
assertFalse(FileUtils.isSymbolicLink(file ));
assertFalse( FileUtils.isSymbolicLink( file ) );
}

@Test
Expand Down

0 comments on commit 5b78029

Please sign in to comment.