Skip to content

Commit 0252b13

Browse files
refactor: Fix some warnings
1 parent 003752a commit 0252b13

3 files changed

Lines changed: 0 additions & 14 deletions

File tree

src/main/java/net/marcellperger/mathexpr/cli/minicli/CLIOption.java

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,8 @@
11
package net.marcellperger.mathexpr.cli.minicli;
22

3-
import org.jetbrains.annotations.NotNull;
43
import org.jetbrains.annotations.Nullable;
54

65
import java.util.List;
7-
import java.util.Objects;
86

97
public abstract class CLIOption<T> {
108
List<String> names;

src/main/java/net/marcellperger/mathexpr/cli/minicli/MiniCLI.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@
1010
import java.util.HashMap;
1111
import java.util.List;
1212
import java.util.Map;
13-
import java.util.Objects;
1413

1514
public class MiniCLI {
1615
Map<String, CLIOption<?>> options = new HashMap<>();

src/main/java/net/marcellperger/mathexpr/util/Util.java

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -108,17 +108,6 @@ public static void expectOrFail(boolean cond) {
108108
if(!cond) throw new AssertionError("Assertion failed in expectOrFail");
109109
}
110110

111-
// @Contract("_, _ -> param1")
112-
// public static<T> T expectOrFail(T value, @NotNull Predicate<T> predicate, ) {
113-
// if(!predicate.test(value)) throw new AssertionError("Assertion failed in expectOrFail");
114-
// return value;
115-
// }
116-
// @Contract("_, true -> param1; _, false -> fail")
117-
// public static<T> T expectOrFail(T value, boolean cond) {
118-
// if(!cond) throw new AssertionError("Assertion failed in expectOrFail");
119-
// return value;
120-
// }
121-
122111
@Contract("_, _ -> param1")
123112
public static<T extends Throwable> @NotNull T withCause(@NotNull T exc, @Nullable Throwable cause) {
124113
if(cause != null) exc.initCause(cause);

0 commit comments

Comments
 (0)