3
0
Mirror von https://github.com/ViaVersion/ViaVersion.git synchronisiert 2024-11-03 14:50:30 +01:00

Work around relocation of fastutil reflection call

Dieser Commit ist enthalten in:
KennyTV 2020-11-23 20:49:28 +01:00
Ursprung 9c0b187f31
Commit 8de26a0ad3
Es konnte kein GPG-Schlüssel zu dieser Signatur gefunden werden
GPG-Schlüssel-ID: 6BE3B555EBC5982B

Datei anzeigen

@ -23,7 +23,9 @@ public class BlockConnectionStorage extends StoredObject {
static { static {
try { try {
fastUtilLongObjectHashMap = Class.forName("it.unimi.dsi.fastutil.longs.Long2ObjectOpenHashMap").getConstructor(); //noinspection StringBufferReplaceableByString - prevent relocation
String className = new StringBuilder("it").append(".unimi.dsi.fastutil.longs.Long2ObjectOpenHashMap").toString();
fastUtilLongObjectHashMap = Class.forName(className).getConstructor();
Via.getPlatform().getLogger().info("Using FastUtil Long2ObjectOpenHashMap for block connections"); Via.getPlatform().getLogger().info("Using FastUtil Long2ObjectOpenHashMap for block connections");
} catch (ClassNotFoundException | NoSuchMethodException ignored) { } catch (ClassNotFoundException | NoSuchMethodException ignored) {
} }