Skip to content

Commit

Permalink
File system close declares it throws IOException (#1060)
Browse files Browse the repository at this point in the history
  • Loading branch information
jean-philippe-martin authored and mziccard committed Jun 20, 2016
1 parent e7ca841 commit f322382
Show file tree
Hide file tree
Showing 3 changed files with 52 additions and 50 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -145,10 +145,12 @@ public CloudStoragePath getPath(String first, String... more) {
* Does nothing.
*/
@Override
public void close() {}
public void close() throws IOException {
// TODO(#809): Synchronously close all channels associated with this FileSystem instance.
}

/**
* Returns {@code true}.
* Returns {@code true}, even if you previously called the {@link #close()} method.
*/
@Override
public boolean isOpen() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -391,7 +391,7 @@ public void testExists_trailingSlash() {
}

@Test
public void testExists_trailingSlash_disablePseudoDirectories() {
public void testExists_trailingSlash_disablePseudoDirectories() throws IOException {
try (CloudStorageFileSystem fs = forBucket("military", usePseudoDirectories(false))) {
assertThat(Files.exists(fs.getPath("fashion/"))).isFalse();
}
Expand Down Expand Up @@ -547,7 +547,7 @@ public void testIsDirectory_trailingSlash_alwaysTrue() {
}

@Test
public void testIsDirectory_trailingSlash_pseudoDirectoriesDisabled_false() {
public void testIsDirectory_trailingSlash_pseudoDirectoriesDisabled_false() throws IOException {
try (CloudStorageFileSystem fs = forBucket("doodle", usePseudoDirectories(false))) {
assertThat(Files.isDirectory(fs.getPath("fundir/"))).isFalse();
}
Expand Down
Loading

0 comments on commit f322382

Please sign in to comment.