felix-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dav...@apache.org
Subject svn commit: r1681097 - /felix/trunk/scr/src/main/java/org/apache/felix/scr/impl/runtime/ServiceComponentRuntimeImpl.java
Date Fri, 22 May 2015 12:46:26 GMT
Author: davidb
Date: Fri May 22 12:46:25 2015
New Revision: 1681097

URL: http://svn.apache.org/r1681097
Log:
FELIX-4883 Fix NPE when creating ServiceReferenceDTO - callsite

Modified:
    felix/trunk/scr/src/main/java/org/apache/felix/scr/impl/runtime/ServiceComponentRuntimeImpl.java

Modified: felix/trunk/scr/src/main/java/org/apache/felix/scr/impl/runtime/ServiceComponentRuntimeImpl.java
URL: http://svn.apache.org/viewvc/felix/trunk/scr/src/main/java/org/apache/felix/scr/impl/runtime/ServiceComponentRuntimeImpl.java?rev=1681097&r1=1681096&r2=1681097&view=diff
==============================================================================
--- felix/trunk/scr/src/main/java/org/apache/felix/scr/impl/runtime/ServiceComponentRuntimeImpl.java
(original)
+++ felix/trunk/scr/src/main/java/org/apache/felix/scr/impl/runtime/ServiceComponentRuntimeImpl.java
Fri May 22 12:46:25 2015
@@ -157,7 +157,9 @@ public class ServiceComponentRuntimeImpl
                 int j = 0;
                 for (ServiceReference<?> serviceRef : serviceRefs)
                 {
-                    srDTOs[j++] = serviceReferenceToDTO(serviceRef);
+                    ServiceReferenceDTO srefDTO = serviceReferenceToDTO(serviceRef);
+                    if (srefDTO != null)
+                        srDTOs[j++] = srefDTO;
                 }
                 dto.boundServices = srDTOs;
                 dtos.add(dto);
@@ -181,7 +183,9 @@ public class ServiceComponentRuntimeImpl
                 int j = 0;
                 for (ServiceReference<?> serviceRef : serviceRefs)
                 {
-                    srDTOs[j++] = serviceReferenceToDTO(serviceRef);
+                    ServiceReferenceDTO srefDTO = serviceReferenceToDTO(serviceRef);
+                    if (srefDTO != null)
+                        srDTOs[j++] = srefDTO;
                 }
                 dto.targetServices = srDTOs;
                 dtos.add(dto);



Mime
View raw message