From 75998ae2c3acf7aafdd221ffd7291eb004e75e36 Mon Sep 17 00:00:00 2001 From: Jeremy Wood Date: Sun, 26 Mar 2023 14:10:26 -0400 Subject: [PATCH] Remove EagerlyLoaded. --- .../MultiverseCore/inject/EagerlyLoaded.java | 10 ---------- .../MultiverseCore/inject/PluginInjection.java | 3 +-- 2 files changed, 1 insertion(+), 12 deletions(-) delete mode 100644 src/main/java/com/onarandombox/MultiverseCore/inject/EagerlyLoaded.java diff --git a/src/main/java/com/onarandombox/MultiverseCore/inject/EagerlyLoaded.java b/src/main/java/com/onarandombox/MultiverseCore/inject/EagerlyLoaded.java deleted file mode 100644 index ba4d12bf..00000000 --- a/src/main/java/com/onarandombox/MultiverseCore/inject/EagerlyLoaded.java +++ /dev/null @@ -1,10 +0,0 @@ -package com.onarandombox.MultiverseCore.inject; - -import org.jvnet.hk2.annotations.Contract; - -/** - * Marker interface for services belonging to a plugin that should be eagerly initialized when service injection is - * set up for the owning plugin. - */ -@Contract -public interface EagerlyLoaded { } diff --git a/src/main/java/com/onarandombox/MultiverseCore/inject/PluginInjection.java b/src/main/java/com/onarandombox/MultiverseCore/inject/PluginInjection.java index ad10bb7f..638905fe 100644 --- a/src/main/java/com/onarandombox/MultiverseCore/inject/PluginInjection.java +++ b/src/main/java/com/onarandombox/MultiverseCore/inject/PluginInjection.java @@ -83,8 +83,7 @@ public final class PluginInjection { private Try load() { return Try.runRunnable(() -> ServiceLocatorUtilities.bind(pluginServiceLocator, pluginBinder)) - .flatMap(ignored -> populatePluginServiceLocator(pluginServiceLocator, plugin)) - .andThenTry(locator -> locator.getAllServices(EagerlyLoaded.class)); + .flatMap(ignored -> populatePluginServiceLocator(pluginServiceLocator, plugin)); } @NotNull