From c0a64659c24a137c2d606ce2369de91bb446fc7b Mon Sep 17 00:00:00 2001 From: Extollite <42713788+Extollite@users.noreply.github.com> Date: Tue, 12 Jan 2021 21:41:15 +0100 Subject: [PATCH] Close en_us.hash stream (#1833) --- .../main/java/org/geysermc/connector/utils/LocaleUtils.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/connector/src/main/java/org/geysermc/connector/utils/LocaleUtils.java b/connector/src/main/java/org/geysermc/connector/utils/LocaleUtils.java index 8619eaf0d..f2ec43bf6 100644 --- a/connector/src/main/java/org/geysermc/connector/utils/LocaleUtils.java +++ b/connector/src/main/java/org/geysermc/connector/utils/LocaleUtils.java @@ -142,8 +142,9 @@ public class LocaleUtils { try { File hashFile = GeyserConnector.getInstance().getBootstrap().getConfigFolder().resolve("locales/en_us.hash").toFile(); if (hashFile.exists()) { - BufferedReader br = new BufferedReader(new FileReader(hashFile)); - curHash = br.readLine().trim(); + try (BufferedReader br = new BufferedReader(new FileReader(hashFile))) { + curHash = br.readLine().trim(); + } } } catch (IOException ignored) { } targetHash = clientJarInfo.getSha1();