Skip to content
This repository was archived by the owner on Feb 26, 2025. It is now read-only.

Commit 0096e12

Browse files
committed
Merge branch 'move' of https://github.com/heikkipora/Amazon-S3-FileSystem-NIO2 into heikkipora-move
2 parents 8f58bff + d014f70 commit 0096e12

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

src/main/java/com/upplication/s3fs/S3FileSystemProvider.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -397,7 +397,8 @@ public void copy(Path source, Path target, CopyOption... options) throws IOExcep
397397

398398
@Override
399399
public void move(Path source, Path target, CopyOption... options) throws IOException {
400-
throw new UnsupportedOperationException();
400+
copy(source, target, options);
401+
delete(source);
401402
}
402403

403404
@Override

src/test/java/com/upplication/s3fs/S3FileSystemProviderTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -919,7 +919,7 @@ public void copyAlreadyExists() throws IOException {
919919
s3fsProvider.copy(file, fileDest);
920920
}
921921

922-
@Test(expected = UnsupportedOperationException.class)
922+
@Test
923923
public void move() throws IOException {
924924
// fixtures
925925
AmazonS3ClientMock client = AmazonS3MockFactory.getAmazonClientMock();

0 commit comments

Comments
 (0)