From f0f204fcb2ac174c182da96bd9c5fa994640c58f Mon Sep 17 00:00:00 2001 From: YouHaveTrouble Date: Sat, 19 Jul 2025 10:53:12 +0200 Subject: [PATCH] assert to shut the warnings up, the exception is caught already --- .../inviter/http/endpoints/GetDiscordInviteByGuildId.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/main/java/me/youhavetrouble/inviter/http/endpoints/GetDiscordInviteByGuildId.java b/src/main/java/me/youhavetrouble/inviter/http/endpoints/GetDiscordInviteByGuildId.java index 3e0ed0b..b10d412 100644 --- a/src/main/java/me/youhavetrouble/inviter/http/endpoints/GetDiscordInviteByGuildId.java +++ b/src/main/java/me/youhavetrouble/inviter/http/endpoints/GetDiscordInviteByGuildId.java @@ -24,6 +24,7 @@ public class GetDiscordInviteByGuildId implements EndpointHandler { public GetDiscordInviteByGuildId() { String invitesDisabledTemplate = null; try (InputStream resource = this.getClass().getResourceAsStream("/template/invites-paused.html")) { + assert resource != null; invitesDisabledTemplate = new String(resource.readAllBytes()); } catch (IOException | NullPointerException e) { Main.LOGGER.warn("Failed to load template for invites disabled page", e); @@ -32,6 +33,7 @@ public class GetDiscordInviteByGuildId implements EndpointHandler { String botNotInGuildTemplate = null; try (InputStream resource = this.getClass().getResourceAsStream("/template/guild-not-supported.html")) { + assert resource != null; botNotInGuildTemplate = new String(resource.readAllBytes()); } catch (IOException | NullPointerException e) { Main.LOGGER.warn("Failed to load template for guild not supported page", e);