[FELIX-1768]should catch exception for FeaturesServiceImpl.internalAddRepository per uri
git-svn-id: https://svn.apache.org/repos/asf/felix/trunk@826157 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/karaf/features/core/src/main/java/org/apache/felix/karaf/features/internal/FeaturesServiceImpl.java b/karaf/features/core/src/main/java/org/apache/felix/karaf/features/internal/FeaturesServiceImpl.java
index a6dd8b5..c38db1e 100644
--- a/karaf/features/core/src/main/java/org/apache/felix/karaf/features/internal/FeaturesServiceImpl.java
+++ b/karaf/features/core/src/main/java/org/apache/felix/karaf/features/internal/FeaturesServiceImpl.java
@@ -162,12 +162,19 @@
}
protected RepositoryImpl internalAddRepository(URI uri) throws Exception {
- RepositoryImpl repo = new RepositoryImpl(uri);
- repo.load();
- repositories.put(uri, repo);
- callListeners(new RepositoryEvent(repo, RepositoryEvent.EventType.RepositoryAdded, false));
- features = null;
+ RepositoryImpl repo = null;
+ try {
+ repo = new RepositoryImpl(uri);
+ repo.load();
+ repositories.put(uri, repo);
+ callListeners(new RepositoryEvent(repo, RepositoryEvent.EventType.RepositoryAdded, false));
+ features = null;
+
+ } catch (Exception e) {
+ LOGGER.warn(e.getMessage());
+ }
return repo;
+
}
public void removeRepository(URI uri) {