Skip to content

Commit

Permalink
minor cleanups, code quality
Browse files Browse the repository at this point in the history
  • Loading branch information
xyzsd committed Dec 18, 2023
1 parent 5367bc0 commit 943beea
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
3 changes: 1 addition & 2 deletions src/main/java/net/xyzsd/dichotomy/Either.java
Original file line number Diff line number Diff line change
Expand Up @@ -875,7 +875,6 @@ public boolean ifPredicateLeft(@NotNull Predicate<L> lp) {
/**
* {@inheritDoc}
*/
@SuppressWarnings("unchecked")
@Override
public @NotNull <L2> Either<L2, R> mapLeft(@NotNull Function<? super L, ? extends L2> leftMapper) {
requireNonNull( leftMapper );
Expand Down Expand Up @@ -1308,7 +1307,7 @@ public boolean ifPredicateLeft(@NotNull Predicate<L> lp) {
*/
@Override
@NotNull
public <X extends Throwable> R expect(@NotNull Supplier<X> supplier) throws X {
public <X extends Throwable> R expect(@NotNull Supplier<X> supplier) {
// supplier not invoked
requireNonNull( supplier );
return value;
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/net/xyzsd/dichotomy/Maybe.java
Original file line number Diff line number Diff line change
Expand Up @@ -381,7 +381,7 @@ public boolean isNone() {
}

@Override
public <X extends Throwable> @NotNull T getOrThrow(@NotNull Supplier<X> supplier) throws X {
public <X extends Throwable> @NotNull T getOrThrow(@NotNull Supplier<X> supplier) {
return value;
}
}
Expand Down

0 comments on commit 943beea

Please sign in to comment.