Fix spacing

This commit is contained in:
Draycia committed 2020-09-09 20:20:45 -07:00
1 parent a8788c7d3d
commit a47ff4e7b2
74 files changed
+5000 -4927

No files matched your search

@@ -7,19 +7,19 @@ import org.checkerframework.checker.nullness.qual.NonNull;
@SuppressWarnings("ResultOfMethodCallIgnored") // This is a common pattern in this class.
public final class FunctionalityConstants {
public static final boolean HAS_HOVER_EVENT_METHOD = noThrow(() -> ItemFactory.class.getMethod("hoverContentOf", ItemStack.class));
public static final boolean HAS_HOVER_EVENT_METHOD = noThrow(() -> ItemFactory.class.getMethod("hoverContentOf", ItemStack.class));
private static boolean noThrow(@NonNull ThrowingRunnable runnable) {
try {
runnable.run();
return true;
} catch (Exception ex) {
return false;
}
private static boolean noThrow(@NonNull ThrowingRunnable runnable) {
try {
runnable.run();
return true;
} catch (Exception ex) {
return false;
}
}
@FunctionalInterface
private interface ThrowingRunnable {
void run() throws Exception;
}
@FunctionalInterface
private interface ThrowingRunnable {
void run() throws Exception;
}
}