From 8da53958ed0980a327ec50738aafd588304b9c73 Mon Sep 17 00:00:00 2001 From: James Moger <james.moger@gitblit.com> Date: Mon, 17 Mar 2014 13:31:16 -0400 Subject: [PATCH] Merged #34 "Fix NPE in FileTicketService on finding all journals" --- src/main/java/com/gitblit/IStoredSettings.java | 20 ++++++++++++++++++++ 1 files changed, 20 insertions(+), 0 deletions(-) diff --git a/src/main/java/com/gitblit/IStoredSettings.java b/src/main/java/com/gitblit/IStoredSettings.java index 33c36ac..9c7a2d2 100644 --- a/src/main/java/com/gitblit/IStoredSettings.java +++ b/src/main/java/com/gitblit/IStoredSettings.java @@ -333,6 +333,16 @@ } /** + * Override the specified key with the specified value. + * + * @param key + * @param value + */ + public void overrideSetting(String key, boolean value) { + overrides.put(key, "" + value); + } + + /** * Updates the values for the specified keys and persists the entire * configuration file. * @@ -341,4 +351,14 @@ * @return true if successful */ public abstract boolean saveSettings(Map<String, String> updatedSettings); + + /** + * Merge all settings from the settings parameter into this instance. + * + * @param settings + */ + public void merge(IStoredSettings settings) { + getSettings().putAll(settings.getSettings()); + overrides.putAll(settings.overrides); + } } \ No newline at end of file -- Gitblit v1.9.1