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:40:41 GMT
Repository: karaf
Updated Branches:
  refs/heads/master 6414136a7 -> a67ce95c5


[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/a67ce95c
Tree: http://git-wip-us.apache.org/repos/asf/karaf/tree/a67ce95c
Diff: http://git-wip-us.apache.org/repos/asf/karaf/diff/a67ce95c

Branch: refs/heads/master
Commit: a67ce95c544988c9709e9559f7737197f2915565
Parents: 6414136
Author: Guillaume Nodet <gnodet@gmail.com>
Authored: Fri Sep 5 11:38:49 2014 +0200
Committer: Guillaume Nodet <gnodet@gmail.com>
Committed: Fri Sep 5 11:38:49 2014 +0200

----------------------------------------------------------------------
 .../org/apache/karaf/config/core/impl/ConfigRepositoryImpl.java   | 3 ---
 .../karaf/features/internal/service/FeatureConfigInstaller.java   | 3 ---
 .../handler/EncryptableConfigAdminPropertyPlaceholderTest.java    | 3 +--
 3 files changed, 1 insertion(+), 8 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/karaf/blob/a67ce95c/config/src/main/java/org/apache/karaf/config/core/impl/ConfigRepositoryImpl.java
----------------------------------------------------------------------
diff --git a/config/src/main/java/org/apache/karaf/config/core/impl/ConfigRepositoryImpl.java
b/config/src/main/java/org/apache/karaf/config/core/impl/ConfigRepositoryImpl.java
index 11bb720..4055cd9 100644
--- a/config/src/main/java/org/apache/karaf/config/core/impl/ConfigRepositoryImpl.java
+++ b/config/src/main/java/org/apache/karaf/config/core/impl/ConfigRepositoryImpl.java
@@ -42,9 +42,6 @@ public class ConfigRepositoryImpl implements ConfigRepository {
     @SuppressWarnings({ "rawtypes", "unchecked" })
     public void update(String pid, Dictionary props) throws IOException {
         Configuration cfg = this.configAdmin.getConfiguration(pid, null);
-        if (cfg.getBundleLocation() != null) {
-            cfg.setBundleLocation(null);
-        }
         cfg.update(props);
     }
 

http://git-wip-us.apache.org/repos/asf/karaf/blob/a67ce95c/features/core/src/main/java/org/apache/karaf/features/internal/service/FeatureConfigInstaller.java
----------------------------------------------------------------------
diff --git a/features/core/src/main/java/org/apache/karaf/features/internal/service/FeatureConfigInstaller.java
b/features/core/src/main/java/org/apache/karaf/features/internal/service/FeatureConfigInstaller.java
index 7ff89e8..9d7f38a 100644
--- a/features/core/src/main/java/org/apache/karaf/features/internal/service/FeatureConfigInstaller.java
+++ b/features/core/src/main/java/org/apache/karaf/features/internal/service/FeatureConfigInstaller.java
@@ -102,9 +102,6 @@ public class FeatureConfigInstaller {
 				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/a67ce95c/jaas/blueprint/jasypt/src/test/java/org/apache/karaf/jaas/blueprint/jasypt/handler/EncryptableConfigAdminPropertyPlaceholderTest.java
----------------------------------------------------------------------
diff --git a/jaas/blueprint/jasypt/src/test/java/org/apache/karaf/jaas/blueprint/jasypt/handler/EncryptableConfigAdminPropertyPlaceholderTest.java
b/jaas/blueprint/jasypt/src/test/java/org/apache/karaf/jaas/blueprint/jasypt/handler/EncryptableConfigAdminPropertyPlaceholderTest.java
index a821700..ff6cb79 100644
--- a/jaas/blueprint/jasypt/src/test/java/org/apache/karaf/jaas/blueprint/jasypt/handler/EncryptableConfigAdminPropertyPlaceholderTest.java
+++ b/jaas/blueprint/jasypt/src/test/java/org/apache/karaf/jaas/blueprint/jasypt/handler/EncryptableConfigAdminPropertyPlaceholderTest.java
@@ -115,14 +115,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);


Mime
View raw message