You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@sling.apache.org by ro...@apache.org on 2017/11/07 09:24:49 UTC

[sling-org-apache-sling-commons-osgi] annotated tag org.apache.sling.commons.osgi-2.2.0 created (now 514126f)

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

rombert pushed a change to annotated tag org.apache.sling.commons.osgi-2.2.0
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-commons-osgi.git.


      at 514126f  (tag)
 tagging 742c85e9a5f5afe5b00210b461bfe1dac1011b3f (commit)
      by Carsten Ziegeler
      on Fri Nov 16 07:41:04 2012 +0000

- Log -----------------------------------------------------------------
org.apache.sling.commons.osgi-2.2.0
-----------------------------------------------------------------------

This annotated tag includes the following new commits:

     new df63e8f  First steps towards a Prototype of 'Everything is a Resource'
     new 341e8d7  Make OosgiUtil more generic and cleanup imports
     new 8b99d1f  Prevent NPE if the property value is null in toStringArray
     new d93b1e0  Remove adapter stuff from osgi/commons
     new ae3cfac  SLING-197 Merge resource integration concept into trunk
     new 53d562f  Use OSGi core and cmpendium jars from Felix project.
     new 5d64b45  SLING-204 - add svn ignore patterns for intellij
     new 9451bc4  Move licence and notice to top level dir.
     new 2ca28a2  Add incubator disclaimer.
     new 410331b  Write first element in pom in one line (to avoid problems with the maven release plugin) and minor pom fixes.
     new 8866927  Update notice files.
     new 8534b0e  SLING-402 Move osgi/commons to commons/osgi
     new eb6efe5  SLING-402: Move osgi/commons to commons/osgi - correct poms.
     new d353e24  SLING-402: Move osgi/commons to commons/osgi - refactor to commons package.
     new afb619a  Eclude maven-eclipse.xml generated by the maven eclipse plugin.
     new 0665281  SLING-456: Add manifest header parser and junit test.
     new 36986a1  Use new manifest parser in content loader.
     new b1bc9f4  SLING-460: Preserve order of attributes and directives.
     new 554a87f  SLING-442: Clean up exports, imports, dependencies and used plugins.
     new ff7572e  Add method for handling integer properties.
     new 2fb950c  Add method for handling integer properties.
     new 3ac6bd1  SLING-495 - NOTICE files generated using mknotice script
     new c913b91  SLING-495 - NOTICE files updated according to changes in revision 662927
     new 5b61be1  SLING-495 - NOTICE files regenerated with revision 663097 changes
     new 08a1bf1  Use released version of parent pom.
     new a2f82a9  Use released versions (or soon to be released versions).
     new 056094f  [maven-release-plugin] prepare release org.apache.sling.commons.osgi-2.0.0-incubator
     new 078fd76  [maven-release-plugin] prepare for next development iteration
     new 0288d72  Set version to next development version.
     new b65ac41  Fix reference to parent pom.
     new b13381d  SLING-521: Restore more notice files.
     new ddcb4d2  SLING-521: Separate between notice files for bin and src dists.
     new 997457a  SLING-521: Separate between notice files for bin and src dists.
     new 831ffe0  SLING-521: Separate between notice files for bin and src dists.
     new 1e008e6  Change copyright year to 2008.
     new 6ed3e27  Update to released versions.
     new 7c1fff4  [maven-release-plugin] prepare release org.apache.sling.commons.osgi-2.0.2-incubator
     new a039ceb  [maven-release-plugin] prepare for next development iteration
     new 0e2142e  Use latest snapshots again to make project buildable.
     new 0065d7f  Use released versions.
     new aaa7929  Use released parent pom where possible.
     new 07b69ff  Add a test case with several directives and multiple lines.
     new 6badaf3  SLING-555 : Update all poms to use the latest parent pom; update parent pom to include the incubator repo for plugins and use latest plugins.
     new 5c546cb  Add toStringArray method with additional default value.
     new 8869a12  Add more tests.
     new bbb03a8  SLING-782 - Remove dependency to Sling API
     new e2d30f4  SLING-808 : Increase version to 5-incubator-SNAPSHOT
     new acb81c8  Update notice files to include 2009 in copyright statement.
     new 019d7ff  SLING-829 Cosmetics to the bundle/project names
     new 362853f  SLING-833 Accept Collection values and do not require Vector values
     new 960e563  SLING-833 Accept Collection values and do not require Vector values
     new 78aaced  SLING-865 : Move to bundles
     new c0d258d  SLING-865 : Adjust reactor pom and svn information in each module.
     new d27c9ca  SLING-865 : Adjust path to parent pom and add profiles for samples and contrib
     new 256d3f4  Deprecate getProperty(Object, double) and add toDouble(Object, double) to align with the rest of the toTYPE methods taking the object and the default value.
     new 1efaf58  JavaDoc and use Java 5 annotation for deprecation
     new 543d7a9  Use release parent pom
     new d3fcb84  [maven-release-plugin] prepare release org.apache.sling.commons.osgi-2.0.4-incubator
     new b206e97  [maven-release-plugin] prepare for next development iteration
     new 2a6c3d7  Use next dev version of parent pom
     new ca93db2  Set parent pom to released version.
     new 50e721b  Move Sling to new TLP location
     new 428dbbb  SLING-1011 : Remove disclaimer file.
     new db20824  SLING-1011 : Adjust svn location
     new 0c6d1d4  SLING-1011 : Remove disclaimer from readme's, adjust links to webite, fix versions in poms.
     new b3d732e  SLING-1033 Upgrade to Sling parent POM 6 (and ensure web app has the leglize stuff, too)
     new 629278b  Use generics.
     new eef9262  SLING-1205 Upgrade all projects to parent POM 8 and use OSGi provided OSGi libraries
     new 8ad219e  Add some javadocs.
     new 404fc99  Correct javadocs.
     new fad56ae  Add some tests for the OsgiUtil
     new d475594  SLING-1278 - Utilities for bundle version extraction and comparison
     new 93f3b11  SLING-1278 - make BundleVersionInfo abstract and Comparable
     new db67575  SLING-1278 - comparison was reversed
     new cfe23d4  SLING-1285 - Launchpad did not start under Windows
     new 55158d5  Clean up code.
     new 24fb4d3  clean up code.
     new 8a4075e  SLING-1431 : Utility method to get the service ranking
     new 01b2201  SLING-1431 : Utility method to get the service ranking
     new 2602d92  SLING-1431 : Utility method to get the service ranking
     new 8093e62  Use new osgi util to order services based on their ranking
     new e40f3ef  SLING-1431 : Utility method to get the service ranking - implement equals and hashCode
     new 6f04ac5  formatting
     new 6c07ba6  [maven-release-plugin] prepare release org.apache.sling.commons.osgi-2.0.6
     new e510fc8  [maven-release-plugin] prepare for next development iteration
     new 39f6c65  Update some notice files
     new a88ca89  Use released parent pom.
     new e023c37  updating all modules to parent 10-SNAPSHOT in anticipation of emma additions to parent
     new 37f3bab  Update to recent snapshots
     new dd7c7bc  Use latest releases.
     new a4d182b  SLING-2008 : Move properties support to own class
     new 8b0b615  SLING-2081 : Bundle version manifest entry is a string (not a Version object)
     new 5f058cb  Remove obsolete licence and notice files
     new b40897c  SLING-2150 : Update plugins to use the latest available versions
     new e2843fd  Update to recent snapshot
     new 82d3a9a  Using latest released parent pom
     new 44c5dcc  [maven-release-plugin] prepare release org.apache.sling.commons.osgi-2.1.0
     new 591a844  [maven-release-plugin] prepare for next development iteration
     new 8d4d39b  SLING-2187 - adding new module to contain our custom notice file; adding remote-resources plugin configuration to parent pom and removing all existing appended-resources NOTICE files
     new 08b1fbb  temporarily using snapshots during release vote
     new d67d549  using latest releases
     new 2c7bc53  SLING-2480 : Add config for maven-sling-plugin to m2e configuration
     new 4f76a87  Update to latest parent pom
     new 33e3b0c  Use released versions
     new 39e39fd  SLING-2645 Move SortingServiceTracker from org.apache.sling.installer.core.impl to org.apache.sling.commons.osgi
     new f47b5ff   SLING-2625 Patch from Chetan Mehrotra to include utility method to convert config values to maps, applied. Thank you. Incremented version of the o.a.s.commons.osgi to 2.2.0 due to addition of new method.
     new 8e03546  [maven-release-plugin] prepare release org.apache.sling.commons.osgi-2.2.0
     new 742c85e  [maven-release-plugin]  copy for tag org.apache.sling.commons.osgi-2.2.0

The 108 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.


-- 
To stop receiving notification emails like this one, please contact
['"commits@sling.apache.org" <co...@sling.apache.org>'].

[sling-org-apache-sling-commons-osgi] 03/11: temporarily using snapshots during release vote

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

rombert pushed a commit to annotated tag org.apache.sling.commons.osgi-2.2.0
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-commons-osgi.git

commit 08b1fbbe8c11a8887d3a1235fc03cbaa3ca39362
Author: Justin Edelson <ju...@apache.org>
AuthorDate: Wed Aug 31 20:10:55 2011 +0000

    temporarily using snapshots during release vote
    
    git-svn-id: https://svn.apache.org/repos/asf/sling/trunk/bundles/commons/osgi@1163785 13f79535-47bb-0310-9956-ffa450edef68
---
 pom.xml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/pom.xml b/pom.xml
index d51f853..6739202 100644
--- a/pom.xml
+++ b/pom.xml
@@ -23,7 +23,7 @@
     <parent>
         <groupId>org.apache.sling</groupId>
         <artifactId>sling</artifactId>
-        <version>12-SNAPSHOT</version>
+        <version>13-SNAPSHOT</version>
         <relativePath>../../../parent/pom.xml</relativePath>
     </parent>
 

-- 
To stop receiving notification emails like this one, please contact
"commits@sling.apache.org" <co...@sling.apache.org>.

[sling-org-apache-sling-commons-osgi] 04/11: using latest releases

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

rombert pushed a commit to annotated tag org.apache.sling.commons.osgi-2.2.0
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-commons-osgi.git

commit d67d549967e835d0b4c49d0b29cffa3ef6c93df8
Author: Justin Edelson <ju...@apache.org>
AuthorDate: Wed Sep 7 14:35:51 2011 +0000

    using latest releases
    
    git-svn-id: https://svn.apache.org/repos/asf/sling/trunk/bundles/commons/osgi@1166199 13f79535-47bb-0310-9956-ffa450edef68
---
 pom.xml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/pom.xml b/pom.xml
index 6739202..cf28005 100644
--- a/pom.xml
+++ b/pom.xml
@@ -23,7 +23,7 @@
     <parent>
         <groupId>org.apache.sling</groupId>
         <artifactId>sling</artifactId>
-        <version>13-SNAPSHOT</version>
+        <version>12</version>
         <relativePath>../../../parent/pom.xml</relativePath>
     </parent>
 

-- 
To stop receiving notification emails like this one, please contact
"commits@sling.apache.org" <co...@sling.apache.org>.

[sling-org-apache-sling-commons-osgi] 09/11: SLING-2625 Patch from Chetan Mehrotra to include utility method to convert config values to maps, applied. Thank you. Incremented version of the o.a.s.commons.osgi to 2.2.0 due to addition of new method.

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

rombert pushed a commit to annotated tag org.apache.sling.commons.osgi-2.2.0
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-commons-osgi.git

commit f47b5ff9a12f7af46ed3bb9a8e17c7ad65419388
Author: Ian Boston <ie...@apache.org>
AuthorDate: Sat Nov 3 00:31:35 2012 +0000

     SLING-2625 Patch from Chetan Mehrotra to include utility method to convert config values to maps, applied. Thank you. Incremented version of the o.a.s.commons.osgi to 2.2.0 due to addition of new method.
    
    git-svn-id: https://svn.apache.org/repos/asf/sling/trunk/bundles/commons/osgi@1405242 13f79535-47bb-0310-9956-ffa450edef68
---
 pom.xml                                            |  2 +-
 .../apache/sling/commons/osgi/PropertiesUtil.java  | 56 ++++++++++++++++++++++
 .../sling/commons/osgi/PropertiesUtilTest.java     | 53 ++++++++++++++++++++
 3 files changed, 110 insertions(+), 1 deletion(-)

diff --git a/pom.xml b/pom.xml
index fba536e..409ab56 100644
--- a/pom.xml
+++ b/pom.xml
@@ -53,7 +53,7 @@
                 <configuration>
                     <instructions>
                         <Export-Package>
-                            org.apache.sling.commons.osgi;version=2.1.0
+                            org.apache.sling.commons.osgi;version=2.2.0
                         </Export-Package>
                     </instructions>
                 </configuration>
diff --git a/src/main/java/org/apache/sling/commons/osgi/PropertiesUtil.java b/src/main/java/org/apache/sling/commons/osgi/PropertiesUtil.java
index 9a69a68..5335ef5 100644
--- a/src/main/java/org/apache/sling/commons/osgi/PropertiesUtil.java
+++ b/src/main/java/org/apache/sling/commons/osgi/PropertiesUtil.java
@@ -20,7 +20,9 @@ package org.apache.sling.commons.osgi;
 
 import java.util.ArrayList;
 import java.util.Collection;
+import java.util.LinkedHashMap;
 import java.util.List;
+import java.util.Map;
 
 /**
  * The <code>PropertiesUtil</code> is a utility class providing some
@@ -216,4 +218,58 @@ public class PropertiesUtil {
 
         return defaultArray;
     }
+
+    /**
+     * Returns the parameter as a map with string keys and string values.
+     *
+     * The parameter is considered as a collection whose entries are of the form
+     * key=value. The conversion has following rules
+     * <ul>
+     *     <li>Entries are of the form key=value</li>
+     *     <li>key is trimmed</li>
+     *     <li>value is trimmed. If a trimmed value results in an empty string it is treated as null</li>
+     *     <li>Malformed entries like 'foo','foo=' are ignored</li>
+     *     <li>Map entries maintain the input order</li>
+     * </ul>
+     *
+     * Otherwise (if the property is <code>null</code>) a provided default value is
+     * returned.
+     * @param propValue The object to convert.
+     * @param defaultArray The default array converted to map.
+     */
+    public static Map<String, String> toMap(Object propValue, String[] defaultArray) {
+        String[] arrayValue = toStringArray(propValue, defaultArray);
+
+        if (arrayValue == null) {
+            return null;
+        }
+
+        //in property values
+        Map<String, String> result = new LinkedHashMap<String, String>();
+        for (String kv : arrayValue) {
+            int indexOfEqual = kv.indexOf('=');
+            if (indexOfEqual > 0) {
+                String key = trimToNull(kv.substring(0, indexOfEqual));
+                String value = trimToNull(kv.substring(indexOfEqual + 1));
+                if (key != null) {
+                    result.put(key, value);
+                }
+            }
+        }
+        return result;
+    }
+
+    private static String trimToNull(String str)    {
+        String ts = trim(str);
+        return isEmpty(ts) ? null : ts;
+    }
+
+    private static String trim(String str){
+        return str == null ? null : str.trim();
+    }
+
+    private static boolean isEmpty(String str){
+        return str == null || str.length() == 0;
+    }
+
 }
diff --git a/src/test/java/org/apache/sling/commons/osgi/PropertiesUtilTest.java b/src/test/java/org/apache/sling/commons/osgi/PropertiesUtilTest.java
new file mode 100644
index 0000000..8c5c3d8
--- /dev/null
+++ b/src/test/java/org/apache/sling/commons/osgi/PropertiesUtilTest.java
@@ -0,0 +1,53 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.sling.commons.osgi;
+
+import java.util.LinkedHashMap;
+import java.util.Map;
+
+import junit.framework.TestCase;
+
+public class PropertiesUtilTest extends TestCase{
+
+    public void testToMap() {
+        final String[] defaultValue = new String[] {"a1=b1","a2=b2"};
+        Map<String,String> expected = asMap("a1","b1","a2","b2");
+        assertEquals(expected,PropertiesUtil.toMap(new String[] {"a1=b1","a2=b2"},null));
+        assertEquals(null,PropertiesUtil.toMap(null,null));
+        assertEquals(expected,PropertiesUtil.toMap(null,defaultValue));
+
+        //Trimming
+        assertEquals(expected,PropertiesUtil.toMap(new String[] {"a1 = b1 "," a2 = b2 "},null));
+
+        //Malformed handling
+        assertEquals(expected,PropertiesUtil.toMap(new String[] {"a1 = b1 "," a2 = b2 ","a3"},null));
+        assertEquals(asMap("a1","b1","a2","b2","a4",null),
+                PropertiesUtil.toMap(new String[] {"a1 = b1 "," a2 = b2 ","a3","a4="},null));
+    }
+
+
+    private static Map<String,String> asMap(String ... entries){
+        Map<String,String> m = new LinkedHashMap<String, String>();
+        for(int i = 0; i < entries.length; i+=2){
+            m.put(entries[i],entries[i+1]);
+        }
+        return m;
+    }
+}

-- 
To stop receiving notification emails like this one, please contact
"commits@sling.apache.org" <co...@sling.apache.org>.

[sling-org-apache-sling-commons-osgi] 05/11: SLING-2480 : Add config for maven-sling-plugin to m2e configuration

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

rombert pushed a commit to annotated tag org.apache.sling.commons.osgi-2.2.0
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-commons-osgi.git

commit 2c7bc53799f5bf4a832558f38733420dcc906bfb
Author: Carsten Ziegeler <cz...@apache.org>
AuthorDate: Wed May 16 07:39:13 2012 +0000

    SLING-2480 : Add config for maven-sling-plugin to m2e configuration
    
    git-svn-id: https://svn.apache.org/repos/asf/sling/trunk/bundles/commons/osgi@1339038 13f79535-47bb-0310-9956-ffa450edef68
---
 pom.xml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/pom.xml b/pom.xml
index cf28005..6739202 100644
--- a/pom.xml
+++ b/pom.xml
@@ -23,7 +23,7 @@
     <parent>
         <groupId>org.apache.sling</groupId>
         <artifactId>sling</artifactId>
-        <version>12</version>
+        <version>13-SNAPSHOT</version>
         <relativePath>../../../parent/pom.xml</relativePath>
     </parent>
 

-- 
To stop receiving notification emails like this one, please contact
"commits@sling.apache.org" <co...@sling.apache.org>.

[sling-org-apache-sling-commons-osgi] 08/11: SLING-2645 Move SortingServiceTracker from org.apache.sling.installer.core.impl to org.apache.sling.commons.osgi

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

rombert pushed a commit to annotated tag org.apache.sling.commons.osgi-2.2.0
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-commons-osgi.git

commit 39e39fdc1f154eae673198c44e48590ab0d4d9e3
Author: Mike Müller <my...@apache.org>
AuthorDate: Thu Nov 1 18:53:12 2012 +0000

    SLING-2645 Move SortingServiceTracker from org.apache.sling.installer.core.impl to org.apache.sling.commons.osgi
    
    git-svn-id: https://svn.apache.org/repos/asf/sling/trunk/bundles/commons/osgi@1404723 13f79535-47bb-0310-9956-ffa450edef68
---
 .../sling/commons/osgi/SortingServiceTracker.java  | 129 +++++++++++++++++++++
 1 file changed, 129 insertions(+)

diff --git a/src/main/java/org/apache/sling/commons/osgi/SortingServiceTracker.java b/src/main/java/org/apache/sling/commons/osgi/SortingServiceTracker.java
new file mode 100644
index 0000000..1bac6ce
--- /dev/null
+++ b/src/main/java/org/apache/sling/commons/osgi/SortingServiceTracker.java
@@ -0,0 +1,129 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.sling.commons.osgi;
+
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.Collections;
+import java.util.List;
+
+import org.osgi.framework.BundleContext;
+import org.osgi.framework.ServiceReference;
+import org.osgi.util.tracker.ServiceTracker;
+
+/**
+ * Implementation providing a sorted list of services
+ * by service ranking.
+ */
+public class SortingServiceTracker<T>
+    extends ServiceTracker  {
+
+    private int lastCount = -1;
+
+    private int lastRefCount = -1;
+
+    private List<T> sortedServiceCache;
+
+    private List<ServiceReference> sortedReferences;
+
+    /**
+     * Constructor
+     */
+    public SortingServiceTracker(final BundleContext context,
+            final String clazz) {
+        super(context, clazz, null);
+    }
+
+    /**
+     * @see org.osgi.util.tracker.ServiceTracker#removedService(org.osgi.framework.ServiceReference, java.lang.Object)
+     */
+    @Override
+    public void removedService(ServiceReference reference, Object service) {
+        this.sortedServiceCache = null;
+        this.sortedReferences = null;
+        this.context.ungetService(reference);
+    }
+
+    /**
+     * @see org.osgi.util.tracker.ServiceTrackerCustomizer#modifiedService(org.osgi.framework.ServiceReference, java.lang.Object)
+     */
+    @Override
+    public void modifiedService(ServiceReference reference, Object service) {
+        this.sortedServiceCache = null;
+        this.sortedReferences = null;
+    }
+
+    /**
+     * @see org.osgi.util.tracker.ServiceTrackerCustomizer#addingService(org.osgi.framework.ServiceReference)
+     */
+    @Override
+    public Object addingService(ServiceReference reference) {
+        this.sortedServiceCache = null;
+        this.sortedReferences = null;
+        return context.getService(reference);
+    }
+
+    /**
+     * Return a sorted list of the services.
+     */
+    public List<T> getSortedServices() {
+        List<T> result = this.sortedServiceCache;
+        if ( result == null || this.lastCount < this.getTrackingCount() ) {
+            this.lastCount = this.getTrackingCount();
+            final ServiceReference[] references = this.getServiceReferences();
+            if ( references == null || references.length == 0 ) {
+                result = Collections.emptyList();
+            } else {
+                Arrays.sort(references);
+                result = new ArrayList<T>();
+                for(int i=0;i<references.length;i++) {
+                    @SuppressWarnings("unchecked")
+                    final T service = (T)this.getService(references[references.length - 1 - i]);
+                    if ( service != null ) {
+                        result.add(service);
+                    }
+                }
+            }
+            this.sortedServiceCache = result;
+        }
+        return result;
+    }
+
+    /**
+     * Return a sorted list of the services references.
+     */
+    public List<ServiceReference> getSortedServiceReferences() {
+        List<ServiceReference> result = this.sortedReferences;
+        if ( result == null || this.lastRefCount < this.getTrackingCount() ) {
+            this.lastRefCount = this.getTrackingCount();
+            final ServiceReference[] references = this.getServiceReferences();
+            if ( references == null || references.length == 0 ) {
+                result = Collections.emptyList();
+            } else {
+                Arrays.sort(references);
+                result = new ArrayList<ServiceReference>();
+                for(int i=0;i<references.length;i++) {
+                    result.add(references[references.length - 1 - i]);
+                }
+            }
+            this.sortedReferences = result;
+        }
+        return result;
+    }
+}

-- 
To stop receiving notification emails like this one, please contact
"commits@sling.apache.org" <co...@sling.apache.org>.

[sling-org-apache-sling-commons-osgi] 07/11: Use released versions

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

rombert pushed a commit to annotated tag org.apache.sling.commons.osgi-2.2.0
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-commons-osgi.git

commit 33e3b0c060f3182ea1e36a0f34c04e6f14df5dd7
Author: Carsten Ziegeler <cz...@apache.org>
AuthorDate: Tue Jul 10 11:07:18 2012 +0000

    Use released versions
    
    git-svn-id: https://svn.apache.org/repos/asf/sling/trunk/bundles/commons/osgi@1359601 13f79535-47bb-0310-9956-ffa450edef68
---
 pom.xml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/pom.xml b/pom.xml
index a7ae072..fba536e 100644
--- a/pom.xml
+++ b/pom.xml
@@ -23,7 +23,7 @@
     <parent>
         <groupId>org.apache.sling</groupId>
         <artifactId>sling</artifactId>
-        <version>14-SNAPSHOT</version>
+        <version>13</version>
         <relativePath>../../../parent/pom.xml</relativePath>
     </parent>
 

-- 
To stop receiving notification emails like this one, please contact
"commits@sling.apache.org" <co...@sling.apache.org>.

[sling-org-apache-sling-commons-osgi] 02/11: SLING-2187 - adding new module to contain our custom notice file; adding remote-resources plugin configuration to parent pom and removing all existing appended-resources NOTICE files

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

rombert pushed a commit to annotated tag org.apache.sling.commons.osgi-2.2.0
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-commons-osgi.git

commit 8d4d39b4c3163cac95226b92eb741e2580e23ca5
Author: Justin Edelson <ju...@apache.org>
AuthorDate: Wed Aug 31 19:23:49 2011 +0000

    SLING-2187 - adding new module to contain our custom notice file; adding remote-resources plugin configuration to parent pom and removing all existing appended-resources NOTICE files
    
    git-svn-id: https://svn.apache.org/repos/asf/sling/trunk/bundles/commons/osgi@1163752 13f79535-47bb-0310-9956-ffa450edef68
---
 pom.xml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/pom.xml b/pom.xml
index ea94510..d51f853 100644
--- a/pom.xml
+++ b/pom.xml
@@ -23,7 +23,7 @@
     <parent>
         <groupId>org.apache.sling</groupId>
         <artifactId>sling</artifactId>
-        <version>11</version>
+        <version>12-SNAPSHOT</version>
         <relativePath>../../../parent/pom.xml</relativePath>
     </parent>
 

-- 
To stop receiving notification emails like this one, please contact
"commits@sling.apache.org" <co...@sling.apache.org>.

[sling-org-apache-sling-commons-osgi] 10/11: [maven-release-plugin] prepare release org.apache.sling.commons.osgi-2.2.0

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

rombert pushed a commit to annotated tag org.apache.sling.commons.osgi-2.2.0
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-commons-osgi.git

commit 8e035461b7e3ec8127300d5c8751c4dce350cbe3
Author: Carsten Ziegeler <cz...@apache.org>
AuthorDate: Fri Nov 16 07:40:51 2012 +0000

    [maven-release-plugin] prepare release org.apache.sling.commons.osgi-2.2.0
    
    git-svn-id: https://svn.apache.org/repos/asf/sling/trunk/bundles/commons/osgi@1410219 13f79535-47bb-0310-9956-ffa450edef68
---
 pom.xml | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/pom.xml b/pom.xml
index 409ab56..77db8c1 100644
--- a/pom.xml
+++ b/pom.xml
@@ -28,16 +28,16 @@
     </parent>
 
     <artifactId>org.apache.sling.commons.osgi</artifactId>
-    <version>2.1.1-SNAPSHOT</version>
+    <version>2.2.0</version>
     <packaging>bundle</packaging>
 
     <name>Apache Sling Commons OSGi support</name>
     <description>Commons OSGi</description>
 
     <scm>
-        <connection>scm:svn:http://svn.apache.org/repos/asf/sling/trunk/bundles/commons/osgi</connection>
-        <developerConnection>scm:svn:https://svn.apache.org/repos/asf/sling/trunk/bundles/commons/osgi</developerConnection>
-        <url>http://svn.apache.org/viewvc/sling/trunk/bundles/commons/osgi</url>
+        <connection>scm:svn:http://svn.apache.org/repos/asf/sling/tags/org.apache.sling.commons.osgi-2.2.0</connection>
+        <developerConnection>scm:svn:https://svn.apache.org/repos/asf/sling/tags/org.apache.sling.commons.osgi-2.2.0</developerConnection>
+        <url>http://svn.apache.org/viewvc/sling/tags/org.apache.sling.commons.osgi-2.2.0</url>
     </scm>
     
     <properties>

-- 
To stop receiving notification emails like this one, please contact
"commits@sling.apache.org" <co...@sling.apache.org>.

[sling-org-apache-sling-commons-osgi] 06/11: Update to latest parent pom

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

rombert pushed a commit to annotated tag org.apache.sling.commons.osgi-2.2.0
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-commons-osgi.git

commit 4f76a879b3e21d094251ffd91f07a898da64ec72
Author: Carsten Ziegeler <cz...@apache.org>
AuthorDate: Thu Jul 5 09:29:47 2012 +0000

    Update to latest parent pom
    
    git-svn-id: https://svn.apache.org/repos/asf/sling/trunk/bundles/commons/osgi@1357521 13f79535-47bb-0310-9956-ffa450edef68
---
 pom.xml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/pom.xml b/pom.xml
index 6739202..a7ae072 100644
--- a/pom.xml
+++ b/pom.xml
@@ -23,7 +23,7 @@
     <parent>
         <groupId>org.apache.sling</groupId>
         <artifactId>sling</artifactId>
-        <version>13-SNAPSHOT</version>
+        <version>14-SNAPSHOT</version>
         <relativePath>../../../parent/pom.xml</relativePath>
     </parent>
 

-- 
To stop receiving notification emails like this one, please contact
"commits@sling.apache.org" <co...@sling.apache.org>.

[sling-org-apache-sling-commons-osgi] 11/11: [maven-release-plugin] copy for tag org.apache.sling.commons.osgi-2.2.0

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

rombert pushed a commit to annotated tag org.apache.sling.commons.osgi-2.2.0
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-commons-osgi.git

commit 742c85e9a5f5afe5b00210b461bfe1dac1011b3f
Author: Carsten Ziegeler <cz...@apache.org>
AuthorDate: Fri Nov 16 07:41:04 2012 +0000

    [maven-release-plugin]  copy for tag org.apache.sling.commons.osgi-2.2.0
    
    git-svn-id: https://svn.apache.org/repos/asf/sling/tags/org.apache.sling.commons.osgi-2.2.0@1410220 13f79535-47bb-0310-9956-ffa450edef68

-- 
To stop receiving notification emails like this one, please contact
"commits@sling.apache.org" <co...@sling.apache.org>.

[sling-org-apache-sling-commons-osgi] 01/11: [maven-release-plugin] prepare for next development iteration

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

rombert pushed a commit to annotated tag org.apache.sling.commons.osgi-2.2.0
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-commons-osgi.git

commit 591a84444d51335c8ef492f384a70422de1dcc73
Author: Carsten Ziegeler <cz...@apache.org>
AuthorDate: Wed Aug 10 12:26:27 2011 +0000

    [maven-release-plugin] prepare for next development iteration
    
    git-svn-id: https://svn.apache.org/repos/asf/sling/trunk/bundles/commons/osgi@1156130 13f79535-47bb-0310-9956-ffa450edef68
---
 pom.xml | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/pom.xml b/pom.xml
index f5bb137..ea94510 100644
--- a/pom.xml
+++ b/pom.xml
@@ -28,16 +28,16 @@
     </parent>
 
     <artifactId>org.apache.sling.commons.osgi</artifactId>
-    <version>2.1.0</version>
+    <version>2.1.1-SNAPSHOT</version>
     <packaging>bundle</packaging>
 
     <name>Apache Sling Commons OSGi support</name>
     <description>Commons OSGi</description>
 
     <scm>
-        <connection>scm:svn:http://svn.apache.org/repos/asf/sling/tags/org.apache.sling.commons.osgi-2.1.0</connection>
-        <developerConnection>scm:svn:https://svn.apache.org/repos/asf/sling/tags/org.apache.sling.commons.osgi-2.1.0</developerConnection>
-        <url>http://svn.apache.org/viewvc/sling/tags/org.apache.sling.commons.osgi-2.1.0</url>
+        <connection>scm:svn:http://svn.apache.org/repos/asf/sling/trunk/bundles/commons/osgi</connection>
+        <developerConnection>scm:svn:https://svn.apache.org/repos/asf/sling/trunk/bundles/commons/osgi</developerConnection>
+        <url>http://svn.apache.org/viewvc/sling/trunk/bundles/commons/osgi</url>
     </scm>
     
     <properties>

-- 
To stop receiving notification emails like this one, please contact
"commits@sling.apache.org" <co...@sling.apache.org>.