mirror of
https://github.com/plan-player-analytics/Plan.git
synced 2025-04-18 18:30:31 +08:00
Missing singleton annotations
This commit is contained in:
parent
90b3e55dc7
commit
ed40c916fb
@ -16,6 +16,7 @@ import com.djrapitops.plan.system.webserver.response.errors.NotFoundResponse;
|
||||
import com.djrapitops.plugin.utilities.Verify;
|
||||
|
||||
import javax.inject.Inject;
|
||||
import javax.inject.Singleton;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
@ -27,6 +28,7 @@ import java.util.List;
|
||||
*
|
||||
* @author Rsl1122
|
||||
*/
|
||||
@Singleton
|
||||
public class InfoRequestPageHandler implements PageHandler {
|
||||
|
||||
private final ConnectionSystem connectionSystem;
|
||||
|
@ -12,6 +12,7 @@ import com.djrapitops.plugin.task.RunnableFactory;
|
||||
import dagger.Lazy;
|
||||
|
||||
import javax.inject.Inject;
|
||||
import javax.inject.Singleton;
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
@ -19,6 +20,7 @@ import java.util.UUID;
|
||||
*
|
||||
* @author Rsl1122
|
||||
*/
|
||||
@Singleton
|
||||
public class InfoRequestFactory {
|
||||
|
||||
private final Lazy<PlanPlugin> plugin;
|
||||
|
@ -12,12 +12,14 @@ import com.djrapitops.plugin.task.RunnableFactory;
|
||||
import dagger.Lazy;
|
||||
|
||||
import javax.inject.Inject;
|
||||
import javax.inject.Singleton;
|
||||
|
||||
/**
|
||||
* Factory for {@link InfoRequest} objects that are used for handling received requests.
|
||||
*
|
||||
* @author Rsl1122
|
||||
*/
|
||||
@Singleton
|
||||
public class InfoRequestHandlerFactory {
|
||||
|
||||
private final Lazy<PlanPlugin> plugin;
|
||||
|
@ -1,6 +1,7 @@
|
||||
package com.djrapitops.plan.system.info.request;
|
||||
|
||||
import javax.inject.Inject;
|
||||
import javax.inject.Singleton;
|
||||
import java.util.HashMap;
|
||||
|
||||
/**
|
||||
@ -10,6 +11,7 @@ import java.util.HashMap;
|
||||
*
|
||||
* @author Rsl1122
|
||||
*/
|
||||
@Singleton
|
||||
public class InfoRequests extends HashMap<String, InfoRequest> {
|
||||
|
||||
@Inject
|
||||
|
@ -10,6 +10,7 @@ import com.djrapitops.plugin.logging.console.PluginLogger;
|
||||
import com.djrapitops.plugin.utilities.Verify;
|
||||
|
||||
import javax.inject.Inject;
|
||||
import javax.inject.Singleton;
|
||||
import java.io.IOException;
|
||||
import java.util.Map;
|
||||
import java.util.UUID;
|
||||
@ -22,6 +23,7 @@ import java.util.UUID;
|
||||
*
|
||||
* @author Rsl1122
|
||||
*/
|
||||
@Singleton
|
||||
public class ServerSpecificSettings {
|
||||
|
||||
private final PluginLogger logger;
|
||||
|
@ -19,6 +19,7 @@ import com.djrapitops.plugin.utilities.Verify;
|
||||
import dagger.Lazy;
|
||||
|
||||
import javax.inject.Inject;
|
||||
import javax.inject.Singleton;
|
||||
import java.io.IOException;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
@ -32,6 +33,7 @@ import static com.djrapitops.plan.system.settings.Settings.*;
|
||||
*
|
||||
* @author Rsl1122
|
||||
*/
|
||||
@Singleton
|
||||
public class NetworkSettings {
|
||||
|
||||
private static final String SPLIT = ";;SETTING;;";
|
||||
|
@ -12,6 +12,7 @@ import com.djrapitops.plan.system.webserver.response.Response;
|
||||
import com.djrapitops.plan.system.webserver.response.ResponseFactory;
|
||||
|
||||
import javax.inject.Inject;
|
||||
import javax.inject.Singleton;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
@ -19,6 +20,7 @@ import java.util.List;
|
||||
*
|
||||
* @author Rsl1122
|
||||
*/
|
||||
@Singleton
|
||||
public class DebugPageHandler implements PageHandler {
|
||||
|
||||
private final ResponseFactory responseFactory;
|
||||
|
@ -21,6 +21,7 @@ import com.djrapitops.plan.system.webserver.response.pages.InspectPageResponse;
|
||||
import com.djrapitops.plan.utilities.uuid.UUIDUtility;
|
||||
|
||||
import javax.inject.Inject;
|
||||
import javax.inject.Singleton;
|
||||
import java.util.List;
|
||||
import java.util.UUID;
|
||||
|
||||
@ -29,6 +30,7 @@ import java.util.UUID;
|
||||
*
|
||||
* @author Rsl1122
|
||||
*/
|
||||
@Singleton
|
||||
public class PlayerPageHandler implements PageHandler {
|
||||
|
||||
private final ResponseFactory responseFactory;
|
||||
|
@ -13,6 +13,7 @@ import com.djrapitops.plan.system.webserver.response.Response;
|
||||
import com.djrapitops.plan.system.webserver.response.ResponseFactory;
|
||||
|
||||
import javax.inject.Inject;
|
||||
import javax.inject.Singleton;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
@ -20,6 +21,7 @@ import java.util.List;
|
||||
*
|
||||
* @author Rsl1122
|
||||
*/
|
||||
@Singleton
|
||||
public class PlayersPageHandler implements PageHandler {
|
||||
|
||||
private final ResponseFactory responseFactory;
|
||||
|
@ -19,6 +19,7 @@ import com.djrapitops.plan.system.webserver.response.pages.AnalysisPageResponse;
|
||||
import com.djrapitops.plugin.api.Check;
|
||||
|
||||
import javax.inject.Inject;
|
||||
import javax.inject.Singleton;
|
||||
import java.util.List;
|
||||
import java.util.Optional;
|
||||
import java.util.UUID;
|
||||
@ -28,6 +29,7 @@ import java.util.UUID;
|
||||
*
|
||||
* @author Rsl1122
|
||||
*/
|
||||
@Singleton
|
||||
public class ServerPageHandler implements PageHandler {
|
||||
|
||||
private final ResponseFactory responseFactory;
|
||||
|
@ -13,11 +13,13 @@ import com.djrapitops.plugin.logging.L;
|
||||
import com.djrapitops.plugin.logging.error.ErrorHandler;
|
||||
|
||||
import javax.inject.Inject;
|
||||
import javax.inject.Singleton;
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
* @author Rsl1122
|
||||
*/
|
||||
@Singleton
|
||||
public class UUIDUtility {
|
||||
|
||||
private final DataCache dataCache;
|
||||
|
@ -1,26 +0,0 @@
|
||||
/*
|
||||
* License is provided in the jar as LICENSE also here:
|
||||
* https://github.com/Rsl1122/Plan-PlayerAnalytics/blob/master/Plan/src/main/resources/LICENSE
|
||||
*/
|
||||
package com.djrapitops.plan.system.database.databases;
|
||||
|
||||
import org.junit.Test;
|
||||
|
||||
/**
|
||||
* Tests MySQLDB.
|
||||
*
|
||||
* @author Rsl1122
|
||||
*/
|
||||
public class MySQLTest {
|
||||
|
||||
@Test
|
||||
public void testMySQLGetConfigName() {
|
||||
// assertEquals("mysql", mySQLDB.getConfigName());
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testMySQLGetName() {
|
||||
// assertEquals("MySQL", mySQLDB.getName());
|
||||
}
|
||||
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user