summaryrefslogtreecommitdiff
path: root/src/main
diff options
context:
space:
mode:
Diffstat (limited to 'src/main')
-rw-r--r--src/main/java/com/keuin/crosslink/config/GlobalConfigManager.java2
-rw-r--r--src/main/java/com/keuin/crosslink/plugin/common/PluginMain.java4
2 files changed, 3 insertions, 3 deletions
diff --git a/src/main/java/com/keuin/crosslink/config/GlobalConfigManager.java b/src/main/java/com/keuin/crosslink/config/GlobalConfigManager.java
index a09fc05..362910c 100644
--- a/src/main/java/com/keuin/crosslink/config/GlobalConfigManager.java
+++ b/src/main/java/com/keuin/crosslink/config/GlobalConfigManager.java
@@ -36,7 +36,7 @@ public class GlobalConfigManager {
public static void initializeGlobalManager(@NotNull File configFileDirectory) throws ConfigLoadException, IOException {
Objects.requireNonNull(configFileDirectory);
synchronized (lock) {
- if (instance == null) {
+ if (instance != null) {
throw new IllegalStateException("already initialized");
}
instance = new GlobalConfigManager(configFileDirectory);
diff --git a/src/main/java/com/keuin/crosslink/plugin/common/PluginMain.java b/src/main/java/com/keuin/crosslink/plugin/common/PluginMain.java
index 9b0d012..a556f92 100644
--- a/src/main/java/com/keuin/crosslink/plugin/common/PluginMain.java
+++ b/src/main/java/com/keuin/crosslink/plugin/common/PluginMain.java
@@ -73,7 +73,7 @@ public final class PluginMain {
rc.configure(messageRouter); // update routing table, clear endpoints
logger.debug("Message router is configured successfully.");
} catch (JsonProcessingException | ConfigSyntaxError ex) {
- logger.error("Failed to load routing config", ex);
+ logger.error("Failed to load routing config.", ex);
throw new RuntimeException(ex);
}
@@ -136,7 +136,7 @@ public final class PluginMain {
try {
GlobalConfigManager.initializeGlobalManager(environment.pluginDataPath().toFile());
} catch (ConfigLoadException | IOException ex) {
- logger.error("Failed to load configuration", ex);
+ logger.error("Failed to load configuration.", ex);
throw new RuntimeException(ex);
}
logger.info("Config files are loaded.");