Skip to content

Commit

Permalink
GH-3247: Throw UncheckedIOException
Browse files Browse the repository at this point in the history
  • Loading branch information
garyrussell committed Apr 14, 2020
1 parent 227bdd8 commit d6c9406
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.io.UncheckedIOException;
import java.time.Duration;
import java.util.ArrayList;
import java.util.List;
Expand Down Expand Up @@ -269,7 +270,7 @@ public boolean rmdir(String remoteDirectory) throws IOException {
}

@Override
public boolean exists(String path) throws IOException {
public boolean exists(String path) {
try {
this.channel.lstat(path);
return true;
Expand All @@ -279,7 +280,8 @@ public boolean exists(String path) throws IOException {
return false;
}
else {
throw new NestedIOException("Cannot check 'lstat' for path " + path, ex);
throw new UncheckedIOException("Cannot check 'lstat' for path " + path,
new IOException(ex));
}
}
}
Expand Down

0 comments on commit d6c9406

Please sign in to comment.