karaf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gno...@apache.org
Subject git commit: [KARAF-3204] Avoid calls to Configuration#setBundleLocation(null) which are not needed
Date Fri, 05 Sep 2014 09:15:17 GMT
Repository: karaf
Updated Branches:
  refs/heads/karaf-2.x 92ffb93ae -> f929072af


[KARAF-3204] Avoid calls to Configuration#setBundleLocation(null) which are not needed


Project: http://git-wip-us.apache.org/repos/asf/karaf/repo
Commit: http://git-wip-us.apache.org/repos/asf/karaf/commit/f929072a
Tree: http://git-wip-us.apache.org/repos/asf/karaf/tree/f929072a
Diff: http://git-wip-us.apache.org/repos/asf/karaf/diff/f929072a

Branch: refs/heads/karaf-2.x
Commit: f929072afc7cb34c3b7688cfcb2bb6d8b4cfa2c7
Parents: 92ffb93
Author: Guillaume Nodet <gnodet@gmail.com>
Authored: Thu Sep 4 18:20:45 2014 +0200
Committer: Guillaume Nodet <gnodet@gmail.com>
Committed: Thu Sep 4 18:20:45 2014 +0200

----------------------------------------------------------------------
 .../org/apache/karaf/features/internal/FeaturesServiceImpl.java   | 3 ---
 .../handler/EncryptableConfigAdminPropertyPlaceholderTest.java    | 3 +--
 .../karaf/management/mbeans/config/internal/ConfigMBeanImpl.java  | 3 ---
 .../java/org/apache/karaf/shell/config/ConfigCommandSupport.java  | 3 ---
 4 files changed, 1 insertion(+), 11 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/karaf/blob/f929072a/features/core/src/main/java/org/apache/karaf/features/internal/FeaturesServiceImpl.java
----------------------------------------------------------------------
diff --git a/features/core/src/main/java/org/apache/karaf/features/internal/FeaturesServiceImpl.java
b/features/core/src/main/java/org/apache/karaf/features/internal/FeaturesServiceImpl.java
index caf23c8..cefa045 100644
--- a/features/core/src/main/java/org/apache/karaf/features/internal/FeaturesServiceImpl.java
+++ b/features/core/src/main/java/org/apache/karaf/features/internal/FeaturesServiceImpl.java
@@ -618,9 +618,6 @@ public class FeaturesServiceImpl implements FeaturesService, FrameworkListener
{
 				cfg = createConfiguration(configAdmin, pid[0], pid[1]);
 				String key = createConfigurationKey(pid[0], pid[1]);
 				cfgProps.put(CONFIG_KEY, key);
-				if (cfg.getBundleLocation() != null) {
-					cfg.setBundleLocation(null);
-				}
 				cfg.update(cfgProps);
 			} else if (config.isAppend()) {
 				Dictionary<String, Object> properties = cfg.getProperties();

http://git-wip-us.apache.org/repos/asf/karaf/blob/f929072a/jaas/jasypt/src/test/java/org/apache/karaf/jaas/jasypt/handler/EncryptableConfigAdminPropertyPlaceholderTest.java
----------------------------------------------------------------------
diff --git a/jaas/jasypt/src/test/java/org/apache/karaf/jaas/jasypt/handler/EncryptableConfigAdminPropertyPlaceholderTest.java
b/jaas/jasypt/src/test/java/org/apache/karaf/jaas/jasypt/handler/EncryptableConfigAdminPropertyPlaceholderTest.java
index b8928e3..d0bc0a2 100644
--- a/jaas/jasypt/src/test/java/org/apache/karaf/jaas/jasypt/handler/EncryptableConfigAdminPropertyPlaceholderTest.java
+++ b/jaas/jasypt/src/test/java/org/apache/karaf/jaas/jasypt/handler/EncryptableConfigAdminPropertyPlaceholderTest.java
@@ -114,14 +114,13 @@ public class EncryptableConfigAdminPropertyPlaceholderTest extends TestCase
{
         configAdmin = getOsgiService(ConfigurationAdmin.class);
         assertNotNull(configAdmin);
 
-        Configuration config = configAdmin.createFactoryConfiguration("encrypt.config");
+        Configuration config = configAdmin.createFactoryConfiguration("encrypt.config", null);
         Dictionary props = new Properties();
 
         // Encrypt a key/value
         // bar is encrypted and link to foo key
         encryptedValue = enc.encrypt("bar");
         props.put("foo", encryptedValue);
-        config.setBundleLocation(null);
         config.update(props);
 
         Configuration[] configs = configAdmin.listConfigurations(null);

http://git-wip-us.apache.org/repos/asf/karaf/blob/f929072a/management/mbeans/config/src/main/java/org/apache/karaf/management/mbeans/config/internal/ConfigMBeanImpl.java
----------------------------------------------------------------------
diff --git a/management/mbeans/config/src/main/java/org/apache/karaf/management/mbeans/config/internal/ConfigMBeanImpl.java
b/management/mbeans/config/src/main/java/org/apache/karaf/management/mbeans/config/internal/ConfigMBeanImpl.java
index 4433519..28a1694 100644
--- a/management/mbeans/config/src/main/java/org/apache/karaf/management/mbeans/config/internal/ConfigMBeanImpl.java
+++ b/management/mbeans/config/src/main/java/org/apache/karaf/management/mbeans/config/internal/ConfigMBeanImpl.java
@@ -260,9 +260,6 @@ public class ConfigMBeanImpl extends StandardMBean implements ConfigMBean
{
                     cfg = configurationAdmin.createFactoryConfiguration(pids[0], null);
                 }
             }
-            if (cfg.getBundleLocation() != null) {
-                cfg.setBundleLocation(null);
-            }
             cfg.update(properties);
         }
     }

http://git-wip-us.apache.org/repos/asf/karaf/blob/f929072a/shell/config/src/main/java/org/apache/karaf/shell/config/ConfigCommandSupport.java
----------------------------------------------------------------------
diff --git a/shell/config/src/main/java/org/apache/karaf/shell/config/ConfigCommandSupport.java
b/shell/config/src/main/java/org/apache/karaf/shell/config/ConfigCommandSupport.java
index 111bcf7..fdd078c 100644
--- a/shell/config/src/main/java/org/apache/karaf/shell/config/ConfigCommandSupport.java
+++ b/shell/config/src/main/java/org/apache/karaf/shell/config/ConfigCommandSupport.java
@@ -235,9 +235,6 @@ public abstract class ConfigCommandSupport extends OsgiCommandSupport
{
                 cfg = admin.createFactoryConfiguration(pids[0], null);
             }
         }
-        if (cfg.getBundleLocation() != null) {
-            cfg.setBundleLocation(null);
-        }
         cfg.update(props);
     }
 


Mime
View raw message