private final EventBus eventBus;
/** The configuration. */
- private Configuration configuration;
+ private final Configuration configuration;
/** Whether we’re currently saving the configuration. */
private boolean storingConfiguration = false;
}
/**
- * Sets the configuration to use. This will automatically save the current
- * configuration to the given configuration.
- *
- * @param configuration
- * The new configuration to use
- */
- public void setConfiguration(Configuration configuration) {
- this.configuration = configuration;
- touchConfiguration();
- }
-
- /**
* Returns the options used by the core.
*
* @return The options of the core
}
}
- final Configuration startConfiguration = oldConfiguration;
+ final Configuration startConfiguration;
+ if ((newConfiguration != null) && (oldConfiguration != newConfiguration)) {
+ logger.log(Level.INFO, "Setting configuration to file-based configuration.");
+ startConfiguration = newConfiguration;
+ } else {
+ startConfiguration = oldConfiguration;
+ }
final EventBus eventBus = new EventBus();
/* Freenet injector configuration. */
/* start core! */
core.start();
- if ((newConfiguration != null) && (oldConfiguration != newConfiguration)) {
- logger.log(Level.INFO, "Setting configuration to file-based configuration.");
- core.setConfiguration(newConfiguration);
- }
webInterface.start();
webInterface.setFirstStart(firstStart);
webInterface.setNewConfig(newConfig);