Mirror von
https://github.com/GeyserMC/Geyser.git
synchronisiert 2024-11-20 06:50:09 +01:00
Remove usage of Fastutil Object2Reference maps
These are only beneficial for containsValue checks.
Dieser Commit ist enthalten in:
Ursprung
2d7a463089
Commit
a99afe4418
@ -26,7 +26,6 @@ dependencies {
|
||||
implementation("com.nukkitx.fastutil", "fastutil-int-boolean-maps", Versions.fastutilVersion)
|
||||
implementation("com.nukkitx.fastutil", "fastutil-object-int-maps", Versions.fastutilVersion)
|
||||
implementation("com.nukkitx.fastutil", "fastutil-object-object-maps", Versions.fastutilVersion)
|
||||
implementation("com.nukkitx.fastutil", "fastutil-object-reference-maps", Versions.fastutilVersion)
|
||||
|
||||
// Network libraries
|
||||
implementation("org.java-websocket", "Java-WebSocket", Versions.websocketVersion)
|
||||
|
@ -25,8 +25,8 @@
|
||||
|
||||
package org.geysermc.geyser.extension;
|
||||
|
||||
import it.unimi.dsi.fastutil.objects.Object2ReferenceMap;
|
||||
import it.unimi.dsi.fastutil.objects.Object2ReferenceOpenHashMap;
|
||||
import it.unimi.dsi.fastutil.objects.Object2ObjectMap;
|
||||
import it.unimi.dsi.fastutil.objects.Object2ObjectOpenHashMap;
|
||||
import org.geysermc.geyser.api.extension.Extension;
|
||||
import org.geysermc.geyser.api.extension.ExtensionDescription;
|
||||
import org.geysermc.geyser.api.extension.exception.InvalidExtensionException;
|
||||
@ -39,7 +39,7 @@ import java.nio.file.Path;
|
||||
|
||||
public class GeyserExtensionClassLoader extends URLClassLoader {
|
||||
private final GeyserExtensionLoader loader;
|
||||
private final Object2ReferenceMap<String, Class<?>> classes = new Object2ReferenceOpenHashMap<>();
|
||||
private final Object2ObjectMap<String, Class<?>> classes = new Object2ObjectOpenHashMap<>();
|
||||
|
||||
public GeyserExtensionClassLoader(GeyserExtensionLoader loader, ClassLoader parent, Path path) throws MalformedURLException {
|
||||
super(new URL[] { path.toUri().toURL() }, parent);
|
||||
|
@ -25,8 +25,8 @@
|
||||
|
||||
package org.geysermc.geyser.extension;
|
||||
|
||||
import it.unimi.dsi.fastutil.objects.Object2ReferenceMap;
|
||||
import it.unimi.dsi.fastutil.objects.Object2ReferenceOpenHashMap;
|
||||
import it.unimi.dsi.fastutil.objects.Object2ObjectMap;
|
||||
import it.unimi.dsi.fastutil.objects.Object2ObjectOpenHashMap;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.checkerframework.checker.nullness.qual.NonNull;
|
||||
import org.geysermc.api.Geyser;
|
||||
@ -51,7 +51,7 @@ import java.util.stream.Stream;
|
||||
public class GeyserExtensionLoader extends ExtensionLoader {
|
||||
private static final Pattern[] EXTENSION_FILTERS = new Pattern[] { Pattern.compile("^.+\\.jar$") };
|
||||
|
||||
private final Object2ReferenceMap<String, Class<?>> classes = new Object2ReferenceOpenHashMap<>();
|
||||
private final Object2ObjectMap<String, Class<?>> classes = new Object2ObjectOpenHashMap<>();
|
||||
private final Map<String, GeyserExtensionClassLoader> classLoaders = new HashMap<>();
|
||||
private final Map<Extension, GeyserExtensionContainer> extensionContainers = new HashMap<>();
|
||||
private final Path extensionsDirectory = GeyserImpl.getInstance().getBootstrap().getConfigFolder().resolve("extensions");
|
||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren