Skip to content

Commit db96915

Browse files
committed
[FELIX-5860] Upgrade to OSGi Compendium 6.0.0
1 parent a25c2e1 commit db96915

File tree

2 files changed

+16
-32
lines changed

2 files changed

+16
-32
lines changed

connect/pom.xml

Lines changed: 5 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -58,13 +58,13 @@
5858
<dependency>
5959
<groupId>org.osgi</groupId>
6060
<artifactId>osgi.core</artifactId>
61-
<version>6.0.0</version>
61+
<version>7.0.0</version>
6262
<scope>provided</scope>
6363
</dependency>
6464
<dependency>
6565
<groupId>org.osgi</groupId>
66-
<artifactId>org.osgi.compendium</artifactId>
67-
<version>5.0.0</version>
66+
<artifactId>osgi.cmpn</artifactId>
67+
<version>7.0.0</version>
6868
<scope>provided</scope>
6969
</dependency>
7070
<dependency>
@@ -103,31 +103,10 @@
103103
<groupId>org.apache.maven.plugins</groupId>
104104
<artifactId>maven-compiler-plugin</artifactId>
105105
<configuration>
106-
<target>1.6</target>
107-
<source>1.6</source>
106+
<target>1.7</target>
107+
<source>1.7</source>
108108
</configuration>
109109
</plugin>
110-
<plugin>
111-
<groupId>org.codehaus.mojo</groupId>
112-
<artifactId>animal-sniffer-maven-plugin</artifactId>
113-
<version>1.5</version>
114-
<executions>
115-
<execution>
116-
<id>check-java-version</id>
117-
<phase>verify</phase>
118-
<goals>
119-
<goal>check</goal>
120-
</goals>
121-
<configuration>
122-
<signature>
123-
<groupId>org.codehaus.mojo.signature</groupId>
124-
<artifactId>java15</artifactId>
125-
<version>1.0</version>
126-
</signature>
127-
</configuration>
128-
</execution>
129-
</executions>
130-
</plugin>
131110
<plugin>
132111
<groupId>org.apache.maven.plugins</groupId>
133112
<artifactId>maven-source-plugin</artifactId>

connect/src/main/java/org/apache/felix/connect/felix/framework/ServiceRegistrationImpl.java

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -18,12 +18,7 @@
1818
*/
1919
package org.apache.felix.connect.felix.framework;
2020

21-
import java.util.Collection;
22-
import java.util.Collections;
23-
import java.util.Dictionary;
24-
import java.util.Enumeration;
25-
import java.util.Map;
26-
import java.util.Set;
21+
import java.util.*;
2722

2823
import org.osgi.framework.Bundle;
2924
import org.osgi.framework.Constants;
@@ -347,6 +342,15 @@ public String[] getPropertyKeys()
347342
return ServiceRegistrationImpl.this.getPropertyKeys();
348343
}
349344

345+
@Override
346+
public Dictionary<String, Object> getProperties() {
347+
Dictionary<String, Object> dictionary = new Hashtable<String, Object>();
348+
for (String key : getPropertyKeys()) {
349+
dictionary.put(key, getProperty(key));
350+
}
351+
return dictionary;
352+
}
353+
350354
@Override
351355
public Bundle getBundle()
352356
{
@@ -506,6 +510,7 @@ else if (rank.compareTo(otherRank) > 0)
506510
// If ranks are equal, then sort by service id in descending order.
507511
return (id.compareTo(otherId) < 0) ? 1 : -1;
508512
}
513+
509514
}
510515

511516
private class ServiceReferenceMap implements Map<String, Object>

0 commit comments

Comments
 (0)