Let the getRequiredHandlerList method throw ConfigurationException.
git-svn-id: https://svn.apache.org/repos/asf/felix/trunk@1530181 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/ipojo/runtime/core/src/main/java/org/apache/felix/ipojo/IPojoFactory.java b/ipojo/runtime/core/src/main/java/org/apache/felix/ipojo/IPojoFactory.java
index 6a13f7c..485c00d 100644
--- a/ipojo/runtime/core/src/main/java/org/apache/felix/ipojo/IPojoFactory.java
+++ b/ipojo/runtime/core/src/main/java/org/apache/felix/ipojo/IPojoFactory.java
@@ -209,8 +209,9 @@
* Computes the required handler list.
* Each sub-type must override this method.
* @return the required handler list
+ * @throws ConfigurationException when the list of handler cannot be computed.
*/
- public abstract List<RequiredHandler> getRequiredHandlerList();
+ public abstract List<RequiredHandler> getRequiredHandlerList() throws ConfigurationException;
/**
* Creates an instance.
@@ -701,7 +702,11 @@
public void restart() {
// Call sub-class to get the list of required handlers.
m_requiredHandlers.clear();
- m_requiredHandlers.addAll(getRequiredHandlerList());
+ try {
+ m_requiredHandlers.addAll(getRequiredHandlerList());
+ } catch (ConfigurationException e) {
+ // Swallow the exception.
+ }
}
/**