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 078a987 [KARAF-6519] Use backward compatiable operation signatures in
ConfigMBean
078a987 is described below
commit 078a9870aceaf8ed5d8d2aa3a9ea0e3adf68c3b9
Author: Jean-Baptiste Onofré <[email protected]>
AuthorDate: Sat Nov 16 06:13:44 2019 +0100
[KARAF-6519] Use backward compatiable operation signatures in ConfigMBean
---
.../src/main/java/org/apache/karaf/config/core/ConfigMBean.java | 4 ++--
.../java/org/apache/karaf/config/core/impl/ConfigMBeanImpl.java | 8 ++++----
2 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/config/src/main/java/org/apache/karaf/config/core/ConfigMBean.java
b/config/src/main/java/org/apache/karaf/config/core/ConfigMBean.java
index 0730116..213c1a1 100644
--- a/config/src/main/java/org/apache/karaf/config/core/ConfigMBean.java
+++ b/config/src/main/java/org/apache/karaf/config/core/ConfigMBean.java
@@ -119,7 +119,7 @@ public interface ConfigMBean {
* @param properties the new properties to set in the configuration.
* @throws MBeanException in case of MBean failure.
*/
- void update(String pid, Map<String, Object> properties) throws
MBeanException;
+ void update(String pid, Map<String, String> properties) throws
MBeanException;
/**
* Add new properties or update existing ones (without removing others) in
a given configuration.
@@ -128,7 +128,7 @@ public interface ConfigMBean {
* @param properties the properties to add/update.
* @throws MBeanException in case of MBean failure.
*/
- void append(String pid, Map<String, Object> properties) throws
MBeanException;
+ void append(String pid, Map<String, String> properties) throws
MBeanException;
/**
* Delete properties from a configuration.
diff --git
a/config/src/main/java/org/apache/karaf/config/core/impl/ConfigMBeanImpl.java
b/config/src/main/java/org/apache/karaf/config/core/impl/ConfigMBeanImpl.java
index 29355c1..81e1fed 100644
---
a/config/src/main/java/org/apache/karaf/config/core/impl/ConfigMBeanImpl.java
+++
b/config/src/main/java/org/apache/karaf/config/core/impl/ConfigMBeanImpl.java
@@ -213,10 +213,10 @@ public class ConfigMBeanImpl extends StandardMBean
implements ConfigMBean {
}
@Override
- public void update(String pid, Map<String, Object> properties) throws
MBeanException {
+ public void update(String pid, Map<String, String> properties) throws
MBeanException {
try {
- TypedProperties props = configRepo.getConfig(pid);
- props.update(properties);
+ TypedProperties props = new TypedProperties();
+ props.putAll(properties);
configRepo.update(pid, props);
} catch (Exception e) {
throw new MBeanException(null, e.toString());
@@ -224,7 +224,7 @@ public class ConfigMBeanImpl extends StandardMBean
implements ConfigMBean {
}
@Override
- public void append(String pid, Map<String, Object> properties) throws
MBeanException {
+ public void append(String pid, Map<String, String> properties) throws
MBeanException {
try {
TypedProperties props = configRepo.getConfig(pid);
props.putAll(properties);