tjwatson commented on a change in pull request #86:
URL: https://github.com/apache/felix-dev/pull/86#discussion_r685152860
##########
File path: framework/src/main/java/org/apache/felix/framework/DTOFactory.java
##########
@@ -335,18 +335,27 @@ private static BundleStartLevelDTO
createBundleStartLevelDTO(Bundle bundle)
if (svcs == null)
return new ServiceReferenceDTO[0];
- ServiceReferenceDTO[] dtos = new ServiceReferenceDTO[svcs.length];
+ List<ServiceReferenceDTO> dtos = new ArrayList<>();
for (int i=0; i < svcs.length; i++)
{
- dtos[i] = createServiceReferenceDTO(svcs[i]);
+ ServiceReferenceDTO dto = createServiceReferenceDTO(svcs[i]);
+ if ( dto != null )
+ {
+ dtos.add(dto);
+ }
}
- return dtos;
+ return dtos.toArray(new ServiceReferenceDTO[dtos.size()]);
}
private static ServiceReferenceDTO
createServiceReferenceDTO(ServiceReference<?> svc)
{
+ final Bundle bundle = svc.getBundle();
Review comment:
Note that the service properties also contain the bundle ID and must
continue to return the bundle ID even after the service has been unregistered.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]