diff --git a/src/main/java/cokr/xit/interfaces/lntris/InterfaceConfig.java b/src/main/java/cokr/xit/interfaces/lntris/InterfaceConfig.java index bc8eeb6..cd356d9 100644 --- a/src/main/java/cokr/xit/interfaces/lntris/InterfaceConfig.java +++ b/src/main/java/cokr/xit/interfaces/lntris/InterfaceConfig.java @@ -80,7 +80,7 @@ public class InterfaceConfig extends AbstractComponent { this.remote = remote; } - public static boolean useDatabase() { + public static boolean databaseActive() { return conf.useDatabase; } diff --git a/src/main/java/cokr/xit/interfaces/lntris/InterfaceInfoReader.java b/src/main/java/cokr/xit/interfaces/lntris/InterfaceInfoReader.java index feee1aa..8add5b5 100644 --- a/src/main/java/cokr/xit/interfaces/lntris/InterfaceInfoReader.java +++ b/src/main/java/cokr/xit/interfaces/lntris/InterfaceInfoReader.java @@ -67,7 +67,7 @@ public abstract class InterfaceInfoReader> extends .read(path) .getMessages() .forEach(info -> { - insertInterfaceInfo().accept(info); + InterfaceConfig.databaseActive(() -> insertInterfaceInfo().accept(info)); List msgs = (List)status.get("messages"); if (msgs == null) status.set("messages", msgs = new ArrayList<>()); diff --git a/src/test/java/cokr/xit/interfaces/lntris/InterfaceConfigTest.java b/src/test/java/cokr/xit/interfaces/lntris/InterfaceConfigTest.java index 01e8040..aea094e 100644 --- a/src/test/java/cokr/xit/interfaces/lntris/InterfaceConfigTest.java +++ b/src/test/java/cokr/xit/interfaces/lntris/InterfaceConfigTest.java @@ -9,7 +9,7 @@ import cokr.xit.foundation.test.TestSupport; public class InterfaceConfigTest extends TestSupport { @Test void config() { - System.out.println("useDatabase: " + InterfaceConfig.useDatabase()); + System.out.println("useDatabase: " + InterfaceConfig.databaseActive()); InterfaceConfig.EndPoint remote = InterfaceConfig.remote(); System.out.println("========== remote =========="); System.out.println("organization: " + remote.getOrganization());