From 3dae7c9c1be62922d6eab69e93ac186ad7ab5120 Mon Sep 17 00:00:00 2001 From: srosse <none@none> Date: Thu, 5 Apr 2018 09:33:24 +0200 Subject: [PATCH] OO-3420: remove NULL value from the persisted properties --- .../org/olat/core/configuration/PersistedProperties.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/main/java/org/olat/core/configuration/PersistedProperties.java b/src/main/java/org/olat/core/configuration/PersistedProperties.java index baf51868fd6..171d78dbdb1 100644 --- a/src/main/java/org/olat/core/configuration/PersistedProperties.java +++ b/src/main/java/org/olat/core/configuration/PersistedProperties.java @@ -366,7 +366,11 @@ public class PersistedProperties extends LogDelegator implements Initializable, synchronized (configuredProperties) { // make read/write save in VM String oldValue = configuredProperties.getProperty(propertyName); if (oldValue == null || !oldValue.equals(value)) { - configuredProperties.setProperty(propertyName, value); + if(value == null) { + configuredProperties.remove(propertyName); + } else { + configuredProperties.setProperty(propertyName, value); + } propertiesDirty = true; if (saveConfiguration) savePropertiesAndFireChangedEvent(); } -- GitLab