You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@karaf.apache.org by gn...@apache.org on 2017/09/11 22:21:23 UTC

[1/2] karaf git commit: [KARAF-5358] Upgrade to Felix Utils 1.10.2 and FileInstall 3.6.2

Repository: karaf
Updated Branches:
  refs/heads/master b4642cb65 -> 7454bbc86


[KARAF-5358] Upgrade to Felix Utils 1.10.2 and FileInstall 3.6.2


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

Branch: refs/heads/master
Commit: 2a32ba2e7438533d2387ecff88934a47091a6dbb
Parents: c5d3a88
Author: Guillaume Nodet <gn...@gmail.com>
Authored: Mon Sep 11 09:01:32 2017 +0200
Committer: Guillaume Nodet <gn...@gmail.com>
Committed: Mon Sep 11 09:01:32 2017 +0200

----------------------------------------------------------------------
 .../internal/service/FeatureConfigInstaller.java        |  7 +++----
 .../test/java/org/apache/karaf/features/AppendTest.java |  4 +++-
 pom.xml                                                 |  4 ++--
 .../java/org/apache/karaf/profile/impl/Profiles.java    | 12 +++++++++---
 4 files changed, 17 insertions(+), 10 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/karaf/blob/2a32ba2e/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 694427e..4ebd043 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
@@ -290,15 +290,14 @@ public class FeatureConfigInstaller {
         for (String key : props.keySet()) {
             if (!isInternalKey(key)) {
                 List<String> comments = props.getComments(key);
-                List<String> value = props.getRaw(key);
-                Object writeValue = (value.size() == 1) ? value.get(0) : value;
+                Object value = props.get(key);
                 if (!properties.containsKey(key)) {
-                    properties.put(key, comments, writeValue);
+                    properties.put(key, comments, value);
                 } else if (!append) {
                     if (comments.isEmpty()) {
                         comments = properties.getComments(key);
                     }
-                    properties.put(key, comments, writeValue);
+                    properties.put(key, comments, value);
                 }
             }
         }

http://git-wip-us.apache.org/repos/asf/karaf/blob/2a32ba2e/features/core/src/test/java/org/apache/karaf/features/AppendTest.java
----------------------------------------------------------------------
diff --git a/features/core/src/test/java/org/apache/karaf/features/AppendTest.java b/features/core/src/test/java/org/apache/karaf/features/AppendTest.java
index 434cbc9..4cb6c83 100644
--- a/features/core/src/test/java/org/apache/karaf/features/AppendTest.java
+++ b/features/core/src/test/java/org/apache/karaf/features/AppendTest.java
@@ -100,7 +100,9 @@ public class AppendTest {
         assertEquals("data/pax-web-jsp", captured.getValue().get("javax.servlet.context.tempdir"));
         Properties props = new Properties();
         props.load(new FileInputStream(cfgFile));
-        assertEquals("data/pax-web-jsp", props.getProperty("javax.servlet.context.tempdir"));
+        String v = props.getProperty("javax.servlet.context.tempdir");
+        assertTrue("${karaf.data}/pax-web-jsp".equals(v) || "data/pax-web-jsp".equals(v));
+//        assertEquals("${karaf.data}/pax-web-jsp", props.getProperty("javax.servlet.context.tempdir"));
     }
 
     private Configuration expectConfig(ConfigurationAdmin admin, Hashtable<String, Object> original)

http://git-wip-us.apache.org/repos/asf/karaf/blob/2a32ba2e/pom.xml
----------------------------------------------------------------------
diff --git a/pom.xml b/pom.xml
index 8fa9035..38a1084 100644
--- a/pom.xml
+++ b/pom.xml
@@ -190,7 +190,7 @@
         <felix.configadmin.version>1.8.14</felix.configadmin.version>
         <felix.connect.version>0.1.0</felix.connect.version>
         <felix.coordinator.version>1.0.2</felix.coordinator.version>
-        <felix.fileinstall.version>3.6.0</felix.fileinstall.version>
+        <felix.fileinstall.version>3.6.2</felix.fileinstall.version>
         <felix.framework.version>5.6.6</felix.framework.version>
         <felix.framework.security.version>2.6.0</felix.framework.security.version>
         <felix.gogo.runtime.version>1.0.6</felix.gogo.runtime.version>
@@ -198,7 +198,7 @@
         <felix.httplite.version>0.1.6</felix.httplite.version>
         <felix.inventory.version>1.0.4</felix.inventory.version>
         <felix.plugin.version>3.3.0</felix.plugin.version>
-        <felix.utils.version>1.10.0</felix.utils.version>
+        <felix.utils.version>1.10.2</felix.utils.version>
         <felix.webconsole.version>4.3.4</felix.webconsole.version>
         <felix.webconsole.api.version>3.1.2</felix.webconsole.api.version>
         <felix.metatype.version>1.1.2</felix.metatype.version>

http://git-wip-us.apache.org/repos/asf/karaf/blob/2a32ba2e/profile/src/main/java/org/apache/karaf/profile/impl/Profiles.java
----------------------------------------------------------------------
diff --git a/profile/src/main/java/org/apache/karaf/profile/impl/Profiles.java b/profile/src/main/java/org/apache/karaf/profile/impl/Profiles.java
index c9ded5c..9fbfdcc 100644
--- a/profile/src/main/java/org/apache/karaf/profile/impl/Profiles.java
+++ b/profile/src/main/java/org/apache/karaf/profile/impl/Profiles.java
@@ -153,6 +153,7 @@ public final class Profiles {
         assertNotNull(profile, "resolvers is null");
 
         final Map<String, TypedProperties> originals = new HashMap<>();
+        final Map<String, TypedProperties> originals2 = new HashMap<>();
         for (Map.Entry<String, byte[]> entry : profile.getFileConfigurations().entrySet()) {
             if (entry.getKey().endsWith(Profile.PROPERTIES_SUFFIX)) {
                 try {
@@ -160,6 +161,9 @@ public final class Profiles {
                     TypedProperties props = new TypedProperties(false);
                     props.load(new ByteArrayInputStream(entry.getValue()));
                     originals.put(key, props);
+                    props = new TypedProperties(false);
+                    props.load(new ByteArrayInputStream(entry.getValue()));
+                    originals2.put(key, props);
                 } catch (IOException e) {
                     throw new IllegalArgumentException("Can not load properties for " + entry.getKey());
                 }
@@ -194,9 +198,11 @@ public final class Profiles {
 
          // Force computation while preserving layout
         ProfileBuilder builder = ProfileBuilder.Factory.createFrom(profile);
-        for (Map.Entry<String, TypedProperties> cfg : originals.entrySet()) {
-            TypedProperties original = cfg.getValue();
-            builder.addFileConfiguration(cfg.getKey() + Profile.PROPERTIES_SUFFIX, Utils.toBytes(original));
+        for (String cfg : originals.keySet()) {
+            TypedProperties original = originals.get(cfg);
+            TypedProperties original2 = originals2.get(cfg);
+            original2.putAll(original);
+            builder.addFileConfiguration(cfg + Profile.PROPERTIES_SUFFIX, Utils.toBytes(original2));
         }
         // Compute the new profile
         return builder.getProfile();


[2/2] karaf git commit: Merge branch 'KARAF-5358', fixes #351

Posted by gn...@apache.org.
Merge branch 'KARAF-5358', fixes #351


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

Branch: refs/heads/master
Commit: 7454bbc8612d51e76c48c51fa1946a9c0f2bfb2f
Parents: b4642cb 2a32ba2
Author: Guillaume Nodet <gn...@gmail.com>
Authored: Tue Sep 12 00:21:00 2017 +0200
Committer: Guillaume Nodet <gn...@gmail.com>
Committed: Tue Sep 12 00:21:00 2017 +0200

----------------------------------------------------------------------
 .../internal/service/FeatureConfigInstaller.java        |  7 +++----
 .../test/java/org/apache/karaf/features/AppendTest.java |  4 +++-
 pom.xml                                                 |  4 ++--
 .../java/org/apache/karaf/profile/impl/Profiles.java    | 12 +++++++++---
 4 files changed, 17 insertions(+), 10 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/karaf/blob/7454bbc8/pom.xml
----------------------------------------------------------------------
diff --cc pom.xml
index c364d56,38a1084..31d03e1
--- a/pom.xml
+++ b/pom.xml
@@@ -190,11 -190,11 +190,11 @@@
          <felix.configadmin.version>1.8.14</felix.configadmin.version>
          <felix.connect.version>0.1.0</felix.connect.version>
          <felix.coordinator.version>1.0.2</felix.coordinator.version>
-         <felix.fileinstall.version>3.6.0</felix.fileinstall.version>
+         <felix.fileinstall.version>3.6.2</felix.fileinstall.version>
          <felix.framework.version>5.6.6</felix.framework.version>
          <felix.framework.security.version>2.6.0</felix.framework.security.version>
 -        <felix.gogo.runtime.version>1.0.6</felix.gogo.runtime.version>
 -        <felix.gogo.jline.version>1.0.6</felix.gogo.jline.version>
 +        <felix.gogo.runtime.version>1.0.8</felix.gogo.runtime.version>
 +        <felix.gogo.jline.version>1.0.8</felix.gogo.jline.version>
          <felix.httplite.version>0.1.6</felix.httplite.version>
          <felix.inventory.version>1.0.4</felix.inventory.version>
          <felix.plugin.version>3.3.0</felix.plugin.version>