From 6c369c7d09bda5189bad5f874c4ba4fa99118af0 Mon Sep 17 00:00:00 2001 From: Andrew Steinborn Date: Sat, 17 Apr 2021 09:05:23 -0400 Subject: [PATCH] Fix SpotBugs stuff --- .../src/main/java/com/velocitypowered/proxy/VelocityServer.java | 2 -- .../java/com/velocitypowered/proxy/util/FileSystemUtils.java | 2 ++ 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/proxy/src/main/java/com/velocitypowered/proxy/VelocityServer.java b/proxy/src/main/java/com/velocitypowered/proxy/VelocityServer.java index 0051f0707..108988372 100644 --- a/proxy/src/main/java/com/velocitypowered/proxy/VelocityServer.java +++ b/proxy/src/main/java/com/velocitypowered/proxy/VelocityServer.java @@ -276,12 +276,10 @@ public class VelocityServer implements ProxyServer, ForwardingAudience { }); } catch (IOException e) { logger.error("Encountered an I/O error whilst loading translations", e); - System.exit(1); } }); } catch (IOException e) { logger.error("Encountered an I/O error whilst loading translations", e); - System.exit(1); return; } GlobalTranslator.get().addSource(translationRegistry); diff --git a/proxy/src/main/java/com/velocitypowered/proxy/util/FileSystemUtils.java b/proxy/src/main/java/com/velocitypowered/proxy/util/FileSystemUtils.java index f103457ba..b623481c5 100644 --- a/proxy/src/main/java/com/velocitypowered/proxy/util/FileSystemUtils.java +++ b/proxy/src/main/java/com/velocitypowered/proxy/util/FileSystemUtils.java @@ -17,6 +17,7 @@ package com.velocitypowered.proxy.util; +import edu.umd.cs.findbugs.annotations.SuppressFBWarnings; import java.io.File; import java.io.IOException; import java.net.URI; @@ -40,6 +41,7 @@ public class FileSystemUtils { * @param path The path to scan within the resource path * @param consumer The consumer to visit the resolved path */ + @SuppressFBWarnings({"RCN_REDUNDANT_NULLCHECK_WOULD_HAVE_BEEN_A_NPE"}) public static boolean visitResources(Class target, Path path, Consumer consumer) throws IOException { final File file = new File(target