This is an automated email from the ASF dual-hosted git repository.
jbonofre pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/karaf.git
The following commit(s) were added to refs/heads/master by this push:
new 188a88e [KARAF-6998] Avoid broken equals of OrderDictionary
new 0b11db1 Merge pull request #1329 from
wborn/KARAF-6998-fix-broken-equals
188a88e is described below
commit 188a88e341d2ac7d471b0266464580743db00a19
Author: Wouter Born <[email protected]>
AuthorDate: Sun Mar 14 15:42:47 2021 +0100
[KARAF-6998] Avoid broken equals of OrderDictionary
---
.../java/org/apache/karaf/config/core/impl/JsonConfigInstaller.java | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git
a/config/src/main/java/org/apache/karaf/config/core/impl/JsonConfigInstaller.java
b/config/src/main/java/org/apache/karaf/config/core/impl/JsonConfigInstaller.java
index 995aa33..fc11a32 100644
---
a/config/src/main/java/org/apache/karaf/config/core/impl/JsonConfigInstaller.java
+++
b/config/src/main/java/org/apache/karaf/config/core/impl/JsonConfigInstaller.java
@@ -80,7 +80,8 @@ public class JsonConfigInstaller implements
ArtifactInstaller, ConfigurationList
old.remove(Constants.SERVICE_PID);
old.remove(ConfigurationAdmin.SERVICE_FACTORYPID);
}
- if (!properties.equals(old)) {
+ // KARAF-6998: Call equals on 'old' because 'properties' is an
OrderDictionary with broken equals
+ if (old == null || !old.equals(properties)) {
properties.put(DirectoryWatcher.FILENAME, toConfigKey(artifact));
if (old == null) {
LOGGER.info("Creating configuration from " + pid[0] + (pid[1]
== null ? "" : "-" + pid[1]) + ".json");