Skip to content

Commit

Permalink
Merge branch 'release/1.2.8' into main
Browse files Browse the repository at this point in the history
  • Loading branch information
overheadhunter committed Jan 21, 2021
2 parents 923ebda + 4d519df commit fd084c3
Show file tree
Hide file tree
Showing 8 changed files with 10 additions and 29 deletions.
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<modelVersion>4.0.0</modelVersion>
<groupId>org.cryptomator</groupId>
<artifactId>fuse-nio-adapter</artifactId>
<version>1.2.7</version>
<version>1.2.8</version>
<name>FUSE-NIO-Adapter</name>
<description>Access resources at a given NIO path via FUSE.</description>
<url>https://github.com/cryptomator/fuse-nio-adapter</url>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ public Path getMountPoint() {
}

@Override
public void reveal(Revealer revealer) throws RevealException {
public void reveal(Revealer revealer) throws Exception {
revealer.reveal(mountPoint);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ public interface Mount extends AutoCloseable {
*
* @param revealer Object containing necessary commands to show the Mount content to the user.
*/
void reveal(Revealer revealer) throws RevealException;
void reveal(Revealer revealer) throws Exception;

/**
* Returns this Mount's mount point.
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,5 @@
@FunctionalInterface
public interface Revealer {

void reveal(Path path) throws RevealException;
void reveal(Path path) throws Exception;
}
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,12 @@
public class AwtFrameworkRevealer implements Revealer {

@Override
public void reveal(Path path) throws RevealException {
public void reveal(Path path) throws IOException, UnsupportedOperationException {
if (Desktop.isDesktopSupported() && Desktop.getDesktop().isSupported(Desktop.Action.OPEN)) {
try {
Desktop.getDesktop().open(path.toFile());
} catch (IOException e) {
throw new RevealException(e);
}
Desktop.getDesktop().open(path.toFile());
} else {
throw new RevealException("Desktop API to browse files not supported.");
throw new UnsupportedOperationException("Desktop API to browse files not supported.");
}
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ public static void main(String[] args) throws IOException {
try (Mount mnt = mounter.mount(tmp, envVars)) {
try {
mnt.reveal(new AwtFrameworkRevealer());
} catch (RevealException e) {
} catch (Exception e) {
System.out.println("Reveal failed.");
}
System.out.println("Wait for it...");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@ private static void mount(Path pathToMirror, Path mountPoint) {
LOG.info("Mounted successfully. Enter anything to stop the server...");
try {
mnt.reveal(new AwtFrameworkRevealer());
} catch (RevealException e) {
} catch (Exception e) {
LOG.warn("Reveal failed.", e);
}
System.in.read();
Expand Down

0 comments on commit fd084c3

Please sign in to comment.