Cleanup a little bit more code.

This commit is contained in:
Matthew Miller
2018-08-06 19:08:15 +10:00
parent 526aa6cf49
commit 5f4cc3e694
21 changed files with 103 additions and 268 deletions

View File

@ -53,7 +53,7 @@ public enum Direction {
private final Vector direction;
private final int flags;
private Direction(Vector vector, int flags) {
Direction(Vector vector, int flags) {
this.direction = vector.normalize();
this.flags = flags;
}

View File

@ -102,7 +102,8 @@ public final class Closer implements Closeable {
public RuntimeException rethrow(Throwable e) throws IOException {
thrown = e;
Throwables.propagateIfPossible(e, IOException.class);
throw Throwables.propagate(e);
Throwables.throwIfUnchecked(e);
throw new RuntimeException(e);
}
/**
@ -124,7 +125,8 @@ public final class Closer implements Closeable {
thrown = e;
Throwables.propagateIfPossible(e, IOException.class);
Throwables.propagateIfPossible(e, declaredType);
throw Throwables.propagate(e);
Throwables.throwIfUnchecked(e);
throw new RuntimeException(e);
}
/**
@ -147,7 +149,8 @@ public final class Closer implements Closeable {
thrown = e;
Throwables.propagateIfPossible(e, IOException.class);
Throwables.propagateIfPossible(e, declaredType1, declaredType2);
throw Throwables.propagate(e);
Throwables.throwIfUnchecked(e);
throw new RuntimeException(e);
}
/**