From 6d7e73d8b2c54b095cb34af4a60097dab492d1d0 Mon Sep 17 00:00:00 2001 From: Junhyeong Lim Date: Fri, 8 Dec 2017 02:12:46 +0900 Subject: [PATCH] Fix IOException: Stream closed --- locales/bsb_de_DE.yml | 2 +- .../us/tastybento/bskyblock/config/YamlResourceBundle.java | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/locales/bsb_de_DE.yml b/locales/bsb_de_DE.yml index f845178f6..04172587f 100644 --- a/locales/bsb_de_DE.yml +++ b/locales/bsb_de_DE.yml @@ -102,7 +102,7 @@ adminInfo: isUnlocked: "Insel ist nicht abgeschlossen" isUnprotected: "Insel ist nicht Purge-geschützt" lastLogin: "Letzter Login" - maxSize: "Insel maximale Größe (Distanz) + maxSize: "Insel maximale Größe (Distanz)" player: "Spieler" teamLeader: "Teamleiter" teamMembers: "Teammitglieder" diff --git a/src/main/java/us/tastybento/bskyblock/config/YamlResourceBundle.java b/src/main/java/us/tastybento/bskyblock/config/YamlResourceBundle.java index 3d9a2db36..2f6a4b878 100644 --- a/src/main/java/us/tastybento/bskyblock/config/YamlResourceBundle.java +++ b/src/main/java/us/tastybento/bskyblock/config/YamlResourceBundle.java @@ -3,9 +3,9 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -167,7 +167,7 @@ public class YamlResourceBundle extends ResourceBundle { String resourceName = toResourceName(bundleName, format); InputStream stream = loader.getResourceAsStream(resourceName); try { - return new YamlResourceBundle(stream); + return stream != null ? new YamlResourceBundle(stream) : null; } finally { if (stream != null) { stream.close();