You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@felix.apache.org by da...@apache.org on 2015/06/10 12:30:10 UTC
svn commit: r1684634 -
/felix/trunk/framework/src/main/java/org/apache/felix/framework/ServiceRegistry.java
Author: davidb
Date: Wed Jun 10 10:30:09 2015
New Revision: 1684634
URL: http://svn.apache.org/r1684634
Log:
Further fix for potential race condition in Service Registry.
Modified:
felix/trunk/framework/src/main/java/org/apache/felix/framework/ServiceRegistry.java
Modified: felix/trunk/framework/src/main/java/org/apache/felix/framework/ServiceRegistry.java
URL: http://svn.apache.org/viewvc/felix/trunk/framework/src/main/java/org/apache/felix/framework/ServiceRegistry.java?rev=1684634&r1=1684633&r2=1684634&view=diff
==============================================================================
--- felix/trunk/framework/src/main/java/org/apache/felix/framework/ServiceRegistry.java (original)
+++ felix/trunk/framework/src/main/java/org/apache/felix/framework/ServiceRegistry.java Wed Jun 10 10:30:09 2015
@@ -419,9 +419,11 @@ public class ServiceRegistry
{
if (count == 0)
{
+ Object svc = usage.m_svcHolderRef.getAndSet(null).m_service;
+
// Remove reference from usages array.
((ServiceRegistrationImpl.ServiceReferenceImpl) ref)
- .getRegistration().ungetService(bundle, usage.getService());
+ .getRegistration().ungetService(bundle, svc);
}
}
finally