You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@karaf.apache.org by ff...@apache.org on 2019/05/31 13:52:51 UTC

[karaf] branch karaf-4.2.x updated (175a8f1 -> 15d4983)

This is an automated email from the ASF dual-hosted git repository.

ffang pushed a change to branch karaf-4.2.x
in repository https://gitbox.apache.org/repos/asf/karaf.git.


    from 175a8f1  Merge pull request #855 from baptistedaroit/KARAF-6290
     new 0305502  [KARAF-6298]remove unused CORBA class
     new fb92de7  [KARAF-6298]make SortedProperties working with both JDK8 and JDK11
     new 1444120  [KARAF-6298]fix XATest|JmsExampleTest|RestExampleTest with JDK11
     new 15d4983  [KARAF-6299]JDK11: don't expose javax.activation package from system bundle 0

The 4 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 .../resources/etc/jre.properties                   |  1 -
 .../src/main/feature/feature.xml                   |  2 ++
 .../karaf/features/internal/service/Deployer.java  |  1 -
 .../test/java/org/apache/karaf/itests/XATest.java  |  7 -------
 .../karaf/itests/examples/JmsExampleTest.java      |  7 -------
 .../resources/test-karaf-home/etc/jre.properties   |  1 -
 .../apache/karaf/tools/utils/SortedProperties.java | 22 +++++++++++++++++++++-
 7 files changed, 23 insertions(+), 18 deletions(-)


[karaf] 01/04: [KARAF-6298]remove unused CORBA class

Posted by ff...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

ffang pushed a commit to branch karaf-4.2.x
in repository https://gitbox.apache.org/repos/asf/karaf.git

commit 0305502095517485f34388dc1a55c4602202febe
Author: Freeman Fang <fr...@gmail.com>
AuthorDate: Thu May 30 12:56:34 2019 -0400

    [KARAF-6298]remove unused CORBA class
    
    (cherry picked from commit 4cb0ee47f4b576715f28a0ce326a6e3d38cad6d3)
---
 .../main/java/org/apache/karaf/features/internal/service/Deployer.java   | 1 -
 1 file changed, 1 deletion(-)

diff --git a/features/core/src/main/java/org/apache/karaf/features/internal/service/Deployer.java b/features/core/src/main/java/org/apache/karaf/features/internal/service/Deployer.java
index 13353a6..b78277d 100644
--- a/features/core/src/main/java/org/apache/karaf/features/internal/service/Deployer.java
+++ b/features/core/src/main/java/org/apache/karaf/features/internal/service/Deployer.java
@@ -63,7 +63,6 @@ import org.apache.karaf.features.internal.util.MapUtils;
 import org.apache.karaf.features.internal.util.MultiException;
 import org.eclipse.equinox.region.Region;
 import org.eclipse.equinox.region.RegionDigraph;
-import org.omg.CORBA.DynAnyPackage.Invalid;
 import org.osgi.framework.Bundle;
 import org.osgi.framework.BundleException;
 import org.osgi.framework.Constants;


[karaf] 04/04: [KARAF-6299]JDK11: don't expose javax.activation package from system bundle 0

Posted by ff...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

ffang pushed a commit to branch karaf-4.2.x
in repository https://gitbox.apache.org/repos/asf/karaf.git

commit 15d4983cd2e57f7c6078c07e111c11a7ccc8db0d
Author: Freeman Fang <fr...@gmail.com>
AuthorDate: Fri May 31 09:51:07 2019 -0400

    [KARAF-6299]JDK11: don't expose javax.activation package from system bundle 0
    
    (cherry picked from commit 7b934f44717829dda5cbf696f6ef14bc55c81474)
---
 .../base/src/main/filtered-resources/resources/etc/jre.properties        | 1 -
 main/src/test/resources/test-karaf-home/etc/jre.properties               | 1 -
 2 files changed, 2 deletions(-)

diff --git a/assemblies/features/base/src/main/filtered-resources/resources/etc/jre.properties b/assemblies/features/base/src/main/filtered-resources/resources/etc/jre.properties
index 72ff9a7..27a5c39 100644
--- a/assemblies/features/base/src/main/filtered-resources/resources/etc/jre.properties
+++ b/assemblies/features/base/src/main/filtered-resources/resources/etc/jre.properties
@@ -538,7 +538,6 @@ jre-1.8= \
 
 jre-9= \
  javax.accessibility, \
- javax.activation;version="1.2", \
  javax.activity, \
  javax.annotation;version="1.0", \
  javax.annotation.processing;version="1.0", \
diff --git a/main/src/test/resources/test-karaf-home/etc/jre.properties b/main/src/test/resources/test-karaf-home/etc/jre.properties
index cb45280..226674b 100644
--- a/main/src/test/resources/test-karaf-home/etc/jre.properties
+++ b/main/src/test/resources/test-karaf-home/etc/jre.properties
@@ -545,7 +545,6 @@ jre-1.8= \
 
 jre-9= \
  javax.accessibility, \
- javax.activation;version="1.1", \
  javax.activity, \
  javax.annotation;version="1.0", \
  javax.annotation.processing;version="1.0", \


[karaf] 03/04: [KARAF-6298]fix XATest|JmsExampleTest|RestExampleTest with JDK11

Posted by ff...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

ffang pushed a commit to branch karaf-4.2.x
in repository https://gitbox.apache.org/repos/asf/karaf.git

commit 1444120f4ad1058246ca0009bd2ac7141277970f
Author: Freeman Fang <fr...@gmail.com>
AuthorDate: Thu May 30 16:09:40 2019 -0400

    [KARAF-6298]fix XATest|JmsExampleTest|RestExampleTest with JDK11
    
    (cherry picked from commit 257c7381a75b2fe58e0d7d5d811d0822acc3c734)
---
 .../karaf-rest-example-features/src/main/feature/feature.xml       | 2 ++
 itests/test/src/test/java/org/apache/karaf/itests/XATest.java      | 7 -------
 .../test/java/org/apache/karaf/itests/examples/JmsExampleTest.java | 7 -------
 3 files changed, 2 insertions(+), 14 deletions(-)

diff --git a/examples/karaf-rest-example/karaf-rest-example-features/src/main/feature/feature.xml b/examples/karaf-rest-example/karaf-rest-example-features/src/main/feature/feature.xml
index 69dc099..bad7a67 100644
--- a/examples/karaf-rest-example/karaf-rest-example-features/src/main/feature/feature.xml
+++ b/examples/karaf-rest-example/karaf-rest-example-features/src/main/feature/feature.xml
@@ -54,6 +54,8 @@
         <feature>http-whiteboard</feature>
         <feature>aries-jax-rs-whiteboard</feature>
         <feature>aries-jax-rs-whiteboard-jackson</feature>
+        <bundle dependency="true">mvn:org.apache.servicemix.specs/org.apache.servicemix.specs.jaxws-api-2.2/${servicemix-spec.version}</bundle>
+        <bundle dependency="true">mvn:org.apache.servicemix.specs/org.apache.servicemix.specs.saaj-api-1.3/${servicemix-spec.version}</bundle>
         <bundle>mvn:org.apache.karaf.examples/karaf-rest-example-whiteboard/${project.version}</bundle>
     </feature>
 
diff --git a/itests/test/src/test/java/org/apache/karaf/itests/XATest.java b/itests/test/src/test/java/org/apache/karaf/itests/XATest.java
index 1c14c55..026a473 100644
--- a/itests/test/src/test/java/org/apache/karaf/itests/XATest.java
+++ b/itests/test/src/test/java/org/apache/karaf/itests/XATest.java
@@ -22,7 +22,6 @@ import org.junit.Rule;
 import org.junit.Test;
 import org.junit.runner.RunWith;
 import org.ops4j.pax.exam.Configuration;
-import org.ops4j.pax.exam.karaf.container.internal.JavaVersionUtil;
 import org.ops4j.pax.exam.MavenUtils;
 import org.ops4j.pax.exam.Option;
 import org.ops4j.pax.exam.junit.PaxExam;
@@ -64,12 +63,6 @@ public class XATest extends KarafTestSupport {
         result.add(replaceConfigurationFile("etc/org.ops4j.connectionfactory-artemis.cfg", getConfigFile("/org/apache/karaf/itests/features/org.ops4j.connectionfactory-artemis.cfg")));
         result.add(replaceConfigurationFile("etc/org.ops4j.datasource-derby.cfg", getConfigFile("/org/apache/karaf/itests/features/org.ops4j.datasource-derby.cfg")));
         result.add(replaceConfigurationFile("etc/xa-test-camel.xml", getConfigFile("/org/apache/karaf/itests/features/xa-test-camel.xml")));
-        if (JavaVersionUtil.getMajorVersion() >= 9) {
-            //need asm 6.x which support java9plus to run this test
-            result.add(replaceConfigurationFile("system/org/apache/karaf/features/standard/" 
-                + version + "/standard-" + version + "-features.xml", 
-                getConfigFile("/etc/feature.xml")));
-        }
         return result.toArray(new Option[result.size()]);
     }
 
diff --git a/itests/test/src/test/java/org/apache/karaf/itests/examples/JmsExampleTest.java b/itests/test/src/test/java/org/apache/karaf/itests/examples/JmsExampleTest.java
index 38214ec..c4ca654 100644
--- a/itests/test/src/test/java/org/apache/karaf/itests/examples/JmsExampleTest.java
+++ b/itests/test/src/test/java/org/apache/karaf/itests/examples/JmsExampleTest.java
@@ -21,7 +21,6 @@ import org.ops4j.pax.exam.Configuration;
 import org.ops4j.pax.exam.MavenUtils;
 import org.ops4j.pax.exam.Option;
 import org.ops4j.pax.exam.junit.PaxExam;
-import org.ops4j.pax.exam.karaf.container.internal.JavaVersionUtil;
 import org.ops4j.pax.exam.spi.reactors.ExamReactorStrategy;
 import org.ops4j.pax.exam.spi.reactors.PerClass;
 
@@ -53,12 +52,6 @@ public class JmsExampleTest extends KarafTestSupport {
         result.add(editConfigurationFilePut("etc/org.apache.karaf.features.cfg", "featuresBoot",
                 "instance,package,log,ssh,framework,system,eventadmin,feature,shell,management,service,jaas,deployer,diagnostic,wrap,bundle,config,kar,aries-blueprint,artemis,jms,pax-jms-artemis"));
         result.add(replaceConfigurationFile("etc/org.ops4j.connectionfactory-artemis.cfg", getConfigFile("/org/apache/karaf/itests/features/org.ops4j.connectionfactory-artemis.cfg")));
-        if (JavaVersionUtil.getMajorVersion() >= 9) {
-            //need asm 6.x which support java9plus to run this test
-            result.add(replaceConfigurationFile("system/org/apache/karaf/features/standard/"
-                            + version + "/standard-" + version + "-features.xml",
-                    getConfigFile("/etc/feature.xml")));
-        }
         return result.toArray(new Option[result.size()]);
     }
 


[karaf] 02/04: [KARAF-6298]make SortedProperties working with both JDK8 and JDK11

Posted by ff...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

ffang pushed a commit to branch karaf-4.2.x
in repository https://gitbox.apache.org/repos/asf/karaf.git

commit fb92de7fb4c31fe49430e6da9afa07c73c565249
Author: Freeman Fang <fr...@gmail.com>
AuthorDate: Thu May 30 13:48:18 2019 -0400

    [KARAF-6298]make SortedProperties working with both JDK8 and JDK11
    
    (cherry picked from commit 1e49b3e00c25eefc1fef04f82d1cd33944f7d498)
---
 .../apache/karaf/tools/utils/SortedProperties.java | 22 +++++++++++++++++++++-
 1 file changed, 21 insertions(+), 1 deletion(-)

diff --git a/tooling/utils/src/main/java/org/apache/karaf/tools/utils/SortedProperties.java b/tooling/utils/src/main/java/org/apache/karaf/tools/utils/SortedProperties.java
index d1c171a..6658dc2 100644
--- a/tooling/utils/src/main/java/org/apache/karaf/tools/utils/SortedProperties.java
+++ b/tooling/utils/src/main/java/org/apache/karaf/tools/utils/SortedProperties.java
@@ -17,7 +17,10 @@
 package org.apache.karaf.tools.utils;
 
 import java.util.Collections;
+import java.util.Comparator;
 import java.util.Enumeration;
+import java.util.Iterator;
+import java.util.LinkedHashSet;
 import java.util.Map;
 import java.util.Properties;
 import java.util.Set;
@@ -37,11 +40,28 @@ public class SortedProperties extends Properties {
 
     @Override
     public Set<Map.Entry<Object, Object>> entrySet() {
-        return Collections.unmodifiableSet(new TreeSet<>(super.entrySet()));
+        Set<Map.Entry<Object, Object>> origSet = super.entrySet();
+        Set<Map.Entry<Object, Object>> sortedSet = new LinkedHashSet<Map.Entry<Object, Object>>(origSet.size());
+
+        Iterator<Map.Entry<Object, Object>> iterator = origSet.stream().sorted(new Comparator<Map.Entry<Object, Object>>() {
+
+            @Override
+            public int compare(java.util.Map.Entry<Object, Object> o1, java.util.Map.Entry<Object, Object> o2) {
+                return o1.getKey().toString().compareTo(o2.getKey().toString());
+            }
+        }).iterator();
+
+        while (iterator.hasNext())
+            sortedSet.add(iterator.next());
+
+        return sortedSet;
     }
 
     @Override
     public synchronized Enumeration<Object> keys() {
         return Collections.enumeration(new TreeSet<>(super.keySet()));
     }
+    
+    
+    
 }