commit | 4792a4d93dbb2ca0cd9600348bae640ce497a8a9 | [log] [tgz] |
---|---|---|
author | Richard S. Hall <rickhall@apache.org> | Wed Nov 10 16:05:12 2010 +0000 |
committer | Richard S. Hall <rickhall@apache.org> | Wed Nov 10 16:05:12 2010 +0000 |
tree | 9854088584097523e0f015f7c7b6bf43c444b86a | |
parent | d201b9c28a071bd0c1b7dd241ae3ab9ab4d934f2 [diff] |
Throw ServiceException and return null for service factory circularity. (FELIX-2693) git-svn-id: https://svn.apache.org/repos/asf/felix/trunk@1033554 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/framework/src/main/java/org/apache/felix/framework/ServiceRegistry.java b/framework/src/main/java/org/apache/felix/framework/ServiceRegistry.java index 6ec6ee4..4bbf780 100644 --- a/framework/src/main/java/org/apache/felix/framework/ServiceRegistry.java +++ b/framework/src/main/java/org/apache/felix/framework/ServiceRegistry.java
@@ -246,8 +246,10 @@ // 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.