felix-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dav...@apache.org
Subject svn commit: r1681073 - /felix/trunk/scr/src/main/java/org/apache/felix/scr/impl/runtime/ServiceComponentRuntimeImpl.java
Date Fri, 22 May 2015 11:42:19 GMT
Author: davidb
Date: Fri May 22 11:42:19 2015
New Revision: 1681073

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

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=1681073&r1=1681072&r2=1681073&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 11:42:19 2015
@@ -192,6 +192,9 @@ public class ServiceComponentRuntimeImpl
 
 	private ServiceReferenceDTO serviceReferenceToDTO( ServiceReference<?> serviceRef)
 	{
+	    if (serviceRef == null)
+	        return null;
+
 		ServiceReferenceDTO dto = new ServiceReferenceDTO();
 		dto.bundle = serviceRef.getBundle().getBundleId();
 		dto.id = (Long) serviceRef.getProperty(Constants.SERVICE_ID);



Mime
View raw message