From 5631518f4bb7e042ad56308178f4e2883c06bf04 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jean-Baptiste=20Onofr=C3=A9?= Date: Wed, 23 May 2018 16:45:36 +0200 Subject: [PATCH] [FELIX-5860] Upgrade to OSGi R7 --- connect/pom.xml | 31 +++---------------- .../framework/ServiceRegistrationImpl.java | 17 ++++++---- 2 files changed, 16 insertions(+), 32 deletions(-) diff --git a/connect/pom.xml b/connect/pom.xml index f5f7bbea744..e18ad72ed4c 100644 --- a/connect/pom.xml +++ b/connect/pom.xml @@ -58,13 +58,13 @@ org.osgi osgi.core - 6.0.0 + 7.0.0 provided org.osgi - org.osgi.compendium - 5.0.0 + osgi.cmpn + 7.0.0 provided @@ -103,31 +103,10 @@ org.apache.maven.plugins maven-compiler-plugin - 1.6 - 1.6 + 1.7 + 1.7 - - org.codehaus.mojo - animal-sniffer-maven-plugin - 1.5 - - - check-java-version - verify - - check - - - - org.codehaus.mojo.signature - java15 - 1.0 - - - - - org.apache.maven.plugins maven-source-plugin diff --git a/connect/src/main/java/org/apache/felix/connect/felix/framework/ServiceRegistrationImpl.java b/connect/src/main/java/org/apache/felix/connect/felix/framework/ServiceRegistrationImpl.java index 2c401b07cf7..e610ef95b9b 100644 --- a/connect/src/main/java/org/apache/felix/connect/felix/framework/ServiceRegistrationImpl.java +++ b/connect/src/main/java/org/apache/felix/connect/felix/framework/ServiceRegistrationImpl.java @@ -18,12 +18,7 @@ */ package org.apache.felix.connect.felix.framework; -import java.util.Collection; -import java.util.Collections; -import java.util.Dictionary; -import java.util.Enumeration; -import java.util.Map; -import java.util.Set; +import java.util.*; import org.osgi.framework.Bundle; import org.osgi.framework.Constants; @@ -347,6 +342,15 @@ public String[] getPropertyKeys() return ServiceRegistrationImpl.this.getPropertyKeys(); } + @Override + public Dictionary getProperties() { + Dictionary dictionary = new Hashtable(); + for (String key : getPropertyKeys()) { + dictionary.put(key, getProperty(key)); + } + return dictionary; + } + @Override public Bundle getBundle() { @@ -506,6 +510,7 @@ else if (rank.compareTo(otherRank) > 0) // If ranks are equal, then sort by service id in descending order. return (id.compareTo(otherId) < 0) ? 1 : -1; } + } private class ServiceReferenceMap implements Map