commit | 7b0263ae45c4730e3388a6a1efe26959fd5ac626 | [log] [tgz] |
---|---|---|
author | Felix Meschberger <fmeschbe@apache.org> | Wed Oct 24 20:23:43 2012 +0000 |
committer | Felix Meschberger <fmeschbe@apache.org> | Wed Oct 24 20:23:43 2012 +0000 |
tree | b968ee137c181e546165bb1069d97d1775d45f1a | |
parent | d6846a976cd20deb98df17948f5c3bde1e1166ca [diff] |
FELIX-3731 Support multi-value service.pid properties git-svn-id: https://svn.apache.org/repos/asf/felix/trunk@1401860 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/metatype/src/main/java/org/apache/felix/metatype/internal/Activator.java b/metatype/src/main/java/org/apache/felix/metatype/internal/Activator.java index e399b0d..9dc8928 100644 --- a/metatype/src/main/java/org/apache/felix/metatype/internal/Activator.java +++ b/metatype/src/main/java/org/apache/felix/metatype/internal/Activator.java
@@ -192,8 +192,13 @@ if ( sr != null ) { - String name = ( String ) sr.getProperty( Constants.SERVICE_PID ); - if ( name == null ) + final String name; + String[] pids = ServiceMetaTypeInformation.getServicePids( sr ); + if ( pids != null ) + { + name = pids[0]; + } + else { name = ( ( String[] ) sr.getProperty( Constants.OBJECTCLASS ) )[0]; }