felix-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gno...@apache.org
Subject svn commit: r1807674 - in /felix/trunk/fileinstall/src: main/java/org/apache/felix/fileinstall/internal/ConfigInstaller.java test/java/org/apache/felix/fileinstall/internal/ConfigInstallerTest.java
Date Fri, 08 Sep 2017 07:26:24 GMT
Author: gnodet
Date: Fri Sep  8 07:26:24 2017
New Revision: 1807674

URL: http://svn.apache.org/viewvc?rev=1807674&view=rev
Log:
[FELIX-5684] Set multi-location for created configurations

Modified:
    felix/trunk/fileinstall/src/main/java/org/apache/felix/fileinstall/internal/ConfigInstaller.java
    felix/trunk/fileinstall/src/test/java/org/apache/felix/fileinstall/internal/ConfigInstallerTest.java

Modified: felix/trunk/fileinstall/src/main/java/org/apache/felix/fileinstall/internal/ConfigInstaller.java
URL: http://svn.apache.org/viewvc/felix/trunk/fileinstall/src/main/java/org/apache/felix/fileinstall/internal/ConfigInstaller.java?rev=1807674&r1=1807673&r2=1807674&view=diff
==============================================================================
--- felix/trunk/fileinstall/src/main/java/org/apache/felix/fileinstall/internal/ConfigInstaller.java
(original)
+++ felix/trunk/fileinstall/src/main/java/org/apache/felix/fileinstall/internal/ConfigInstaller.java
Fri Sep  8 07:26:24 2017
@@ -125,7 +125,7 @@ public class ConfigInstaller implements
             {
                 Configuration config = getConfigurationAdmin().getConfiguration(
                                             configurationEvent.getPid(),
-                                            configurationEvent.getFactoryPid());
+                                            "?");
                 Dictionary dict = config.getProperties();
                 String fileName = (String) dict.get( DirectoryWatcher.FILENAME );
                 File file = fileName != null ? fromConfigKey(fileName) : null;
@@ -175,7 +175,7 @@ public class ConfigInstaller implements
             try {
                 Configuration config = getConfigurationAdmin().getConfiguration(
                         configurationEvent.getPid(),
-                        configurationEvent.getFactoryPid());
+                        "?");
                 Dictionary dict = config.getProperties();
                 String fileName = (String) dict.get(DirectoryWatcher.FILENAME);
                 File file = fileName != null ? fromConfigKey(fileName) : null;
@@ -341,11 +341,11 @@ public class ConfigInstaller implements
             Configuration newConfiguration;
             if (factoryPid != null)
             {
-                newConfiguration = getConfigurationAdmin().createFactoryConfiguration(pid,
null);
+                newConfiguration = getConfigurationAdmin().createFactoryConfiguration(pid,
"?");
             }
             else
             {
-                newConfiguration = getConfigurationAdmin().getConfiguration(pid, null);
+                newConfiguration = getConfigurationAdmin().getConfiguration(pid, "?");
             }
             return newConfiguration;
         }

Modified: felix/trunk/fileinstall/src/test/java/org/apache/felix/fileinstall/internal/ConfigInstallerTest.java
URL: http://svn.apache.org/viewvc/felix/trunk/fileinstall/src/test/java/org/apache/felix/fileinstall/internal/ConfigInstallerTest.java?rev=1807674&r1=1807673&r2=1807674&view=diff
==============================================================================
--- felix/trunk/fileinstall/src/test/java/org/apache/felix/fileinstall/internal/ConfigInstallerTest.java
(original)
+++ felix/trunk/fileinstall/src/test/java/org/apache/felix/fileinstall/internal/ConfigInstallerTest.java
Fri Sep  8 07:26:24 2017
@@ -86,7 +86,7 @@ public class ConfigInstallerTest extends
         Capture<Dictionary<String, Object>> props = new Capture<>();
         EasyMock.expect(mockConfigurationAdmin.listConfigurations((String) EasyMock.anyObject()))
                 .andReturn(null);
-        EasyMock.expect(mockConfigurationAdmin.getConfiguration(pid, null))
+        EasyMock.expect(mockConfigurationAdmin.getConfiguration(pid, "?"))
                 .andReturn(mockConfiguration);
         EasyMock.expect(mockConfiguration.getProperties())
                 .andReturn(null);
@@ -117,7 +117,7 @@ public class ConfigInstallerTest extends
         Capture<Dictionary<String, Object>> props = new Capture<>();
         EasyMock.expect(mockConfigurationAdmin.listConfigurations((String) EasyMock.anyObject()))
                 .andReturn(null);
-        EasyMock.expect(mockConfigurationAdmin.getConfiguration(pid, null))
+        EasyMock.expect(mockConfigurationAdmin.getConfiguration(pid, "?"))
                 .andReturn(mockConfiguration);
         EasyMock.expect(mockConfiguration.getProperties())
                 .andReturn(null);
@@ -141,7 +141,7 @@ public class ConfigInstallerTest extends
     {
         EasyMock.expect(mockConfigurationAdmin.listConfigurations((String) EasyMock.anyObject()))
                     .andReturn(null);
-        EasyMock.expect(mockConfigurationAdmin.createFactoryConfiguration( "pid", null ))
+        EasyMock.expect(mockConfigurationAdmin.createFactoryConfiguration( "pid", "?" ))
                     .andReturn(mockConfiguration);
         EasyMock.replay(mockConfiguration, mockConfigurationAdmin, mockBundleContext);
 
@@ -157,7 +157,7 @@ public class ConfigInstallerTest extends
     {
         EasyMock.expect(mockConfigurationAdmin.listConfigurations((String) EasyMock.anyObject()))
                         .andReturn(null);
-        EasyMock.expect(mockConfigurationAdmin.createFactoryConfiguration( "pid", null ))
+        EasyMock.expect(mockConfigurationAdmin.createFactoryConfiguration( "pid", "?" ))
                         .andReturn(mockConfiguration);
         EasyMock.replay(mockConfiguration, mockConfigurationAdmin, mockBundleContext);
 
@@ -173,7 +173,7 @@ public class ConfigInstallerTest extends
     {
         EasyMock.expect(mockConfigurationAdmin.listConfigurations((String) EasyMock.anyObject()))
                         .andReturn(null);
-        EasyMock.expect(mockConfigurationAdmin.getConfiguration( "pid", null ))
+        EasyMock.expect(mockConfigurationAdmin.getConfiguration( "pid", "?" ))
                         .andReturn(mockConfiguration);
         EasyMock.replay(mockConfiguration, mockConfigurationAdmin, mockBundleContext);
 
@@ -192,7 +192,7 @@ public class ConfigInstallerTest extends
         EasyMock.expect(mockBundleContext.getProperty(DirectoryWatcher.LOG_LEVEL)).andReturn(null);
         EasyMock.expect(mockConfigurationAdmin.listConfigurations((String) EasyMock.anyObject()))
                         .andReturn(null);
-        EasyMock.expect(mockConfigurationAdmin.getConfiguration("pid", null ))
+        EasyMock.expect(mockConfigurationAdmin.getConfiguration("pid", "?" ))
                         .andReturn(mockConfiguration);
         EasyMock.replay(mockConfiguration, mockConfigurationAdmin, mockBundleContext);
 
@@ -224,7 +224,7 @@ public class ConfigInstallerTest extends
         mockConfiguration.update(new Hashtable<String, Object>());
         EasyMock.expect(mockConfigurationAdmin.listConfigurations((String) EasyMock.anyObject()))
                         .andReturn(null);
-        EasyMock.expect(mockConfigurationAdmin.getConfiguration("firstcfg", null))
+        EasyMock.expect(mockConfigurationAdmin.getConfiguration("firstcfg", "?"))
                         .andReturn(mockConfiguration);
         EasyMock.replay(mockConfiguration, mockConfigurationAdmin, mockBundleContext);
 



Mime
View raw message