#1265: Ensure UTF-8 used in new test resource

This commit is contained in:
Doc 2023-10-01 15:27:41 +11:00 committed by md_5
parent 99aafc222b
commit ef7a4743d8
No known key found for this signature in database
GPG Key ID: E8E901AC7C617C11

View File

@ -1,6 +1,7 @@
package org.bukkit.craftbukkit.legacy; package org.bukkit.craftbukkit.legacy;
import static org.junit.jupiter.api.Assertions.*; import static org.junit.jupiter.api.Assertions.*;
import com.google.common.base.Charsets;
import java.io.BufferedReader; import java.io.BufferedReader;
import java.io.IOException; import java.io.IOException;
import java.io.InputStream; import java.io.InputStream;
@ -25,7 +26,7 @@ public class PersistentDataContainerLegacyTest extends AbstractTestingBase {
try (final InputStream input = getClass().getClassLoader().getResourceAsStream("pdc/legacy_pdc.yml")) { try (final InputStream input = getClass().getClassLoader().getResourceAsStream("pdc/legacy_pdc.yml")) {
assertNotNull(input, "Legacy pdc yaml was null"); assertNotNull(input, "Legacy pdc yaml was null");
try (BufferedReader reader = new BufferedReader(new InputStreamReader(input))) { try (BufferedReader reader = new BufferedReader(new InputStreamReader(input, Charsets.UTF_8))) {
legacyConfig = YamlConfiguration.loadConfiguration(reader); legacyConfig = YamlConfiguration.loadConfiguration(reader);
} }
} catch (IOException e) { } catch (IOException e) {