You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@felix.apache.org by ri...@apache.org on 2010/11/10 17:05:12 UTC

svn commit: r1033554 - /felix/trunk/framework/src/main/java/org/apache/felix/framework/ServiceRegistry.java

Author: rickhall
Date: Wed Nov 10 16:05:12 2010
New Revision: 1033554

URL: http://svn.apache.org/viewvc?rev=1033554&view=rev
Log:
Throw ServiceException and return null for service factory circularity. (FELIX-2693)

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=1033554&r1=1033553&r2=1033554&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 Nov 10 16:05:12 2010
@@ -246,8 +246,10 @@ public class ServiceRegistry
                 // We don't allow cycles when we call out to the service factory.
                 if (o.equals(Thread.currentThread()))
                 {
-                    throw new IllegalStateException(
-                        "ServiceFactory.getService() resulted in a cycle.");
+                    throw new ServiceException(
+                        "ServiceFactory.getService() resulted in a cycle.",
+                        ServiceException.FACTORY_ERROR,
+                        null);
                 }
 
                 // Otherwise, wait for it to be freed.