X-Git-Url: https://git.pterodactylus.net/?a=blobdiff_plain;f=src%2Fmain%2Fjava%2Fnet%2Fpterodactylus%2Fsone%2Fcore%2FCore.java;h=85631870304f72696db0ab0b19a90200116c9eeb;hb=0fe9320336b76d5e9c90b78b98acd43eb3c3be31;hp=84e813e19fdf09ab4d6bb1f67eb8ab05009e4e41;hpb=eed67a96e4545a032a4cb82ecc8901d041c42deb;p=Sone.git diff --git a/src/main/java/net/pterodactylus/sone/core/Core.java b/src/main/java/net/pterodactylus/sone/core/Core.java index 84e813e..8563187 100644 --- a/src/main/java/net/pterodactylus/sone/core/Core.java +++ b/src/main/java/net/pterodactylus/sone/core/Core.java @@ -46,6 +46,9 @@ public class Core extends AbstractService { /** The configuration. */ private Configuration configuration; + /** Interface to freenet. */ + private FreenetInterface freenetInterface; + /** The local Sones. */ private final Set localSones = new HashSet(); @@ -72,6 +75,18 @@ public class Core extends AbstractService { return this; } + /** + * Sets the Freenet interface to use. + * + * @param freenetInterface + * The Freenet interface to use + * @return This core (for method chaining) + */ + public Core freenetInterface(FreenetInterface freenetInterface) { + this.freenetInterface = freenetInterface; + return this; + } + // // ACTIONS // @@ -99,7 +114,10 @@ public class Core extends AbstractService { logger.entering(Core.class.getName(), "loadConfiguration()"); /* get names of all local Sones. */ - String allSoneNamesString = configuration.getStringValue("Sone/Names").getValue(""); + String allSoneNamesString = configuration.getStringValue("Sone/Names").getValue(null); + if (allSoneNamesString == null) { + allSoneNamesString = ""; + } List allSoneNames; try { allSoneNames = StringEscaper.parseLine(allSoneNamesString);