karaf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jbono...@apache.org
Subject karaf git commit: KARAF-4031 - Fix repo loading
Date Wed, 06 Jan 2016 09:25:26 GMT
Repository: karaf
Updated Branches:
  refs/heads/master 6948726cc -> 0db3724fa


KARAF-4031 - Fix repo loading

KARAF-4083 - Fix repo loading


Project: http://git-wip-us.apache.org/repos/asf/karaf/repo
Commit: http://git-wip-us.apache.org/repos/asf/karaf/commit/0db3724f
Tree: http://git-wip-us.apache.org/repos/asf/karaf/tree/0db3724f
Diff: http://git-wip-us.apache.org/repos/asf/karaf/diff/0db3724f

Branch: refs/heads/master
Commit: 0db3724fa4498b601b6a12b0e0e9b329de93526c
Parents: 6948726
Author: Jean-Baptiste Onofré <jbonofre@apache.org>
Authored: Wed Jan 6 10:25:00 2016 +0100
Committer: Jean-Baptiste Onofré <jbonofre@apache.org>
Committed: Wed Jan 6 10:25:00 2016 +0100

----------------------------------------------------------------------
 .../internal/service/FeaturesServiceImpl.java       | 16 ++++++++--------
 1 file changed, 8 insertions(+), 8 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/karaf/blob/0db3724f/features/core/src/main/java/org/apache/karaf/features/internal/service/FeaturesServiceImpl.java
----------------------------------------------------------------------
diff --git a/features/core/src/main/java/org/apache/karaf/features/internal/service/FeaturesServiceImpl.java
b/features/core/src/main/java/org/apache/karaf/features/internal/service/FeaturesServiceImpl.java
index 3efd8a0..75d7c0f 100644
--- a/features/core/src/main/java/org/apache/karaf/features/internal/service/FeaturesServiceImpl.java
+++ b/features/core/src/main/java/org/apache/karaf/features/internal/service/FeaturesServiceImpl.java
@@ -631,20 +631,20 @@ public class FeaturesServiceImpl implements FeaturesService, Deployer.DeployCall
             synchronized (lock) {
                 repo = repositoryCache.get(uri);
             }
-            if (repo == null) {
-                RepositoryImpl rep = new RepositoryImpl(URI.create(uri), blacklisted);
-                try {
+            try {
+                if (repo == null) {
+                    RepositoryImpl rep = new RepositoryImpl(URI.create(uri), blacklisted);
                     rep.load();
                     repo = rep;
                     synchronized (lock) {
                         repositoryCache.put(uri, repo);
                     }
-                    for (URI u : repo.getRepositories()) {
-                        toLoad.add(u.toString());
-                    }
-                } catch (Exception e) {
-                    LOGGER.warn("Can't load features repository {}", uri, e);
                 }
+                for (URI u : repo.getRepositories()) {
+                    toLoad.add(u.toString());
+                }
+            } catch (Exception e) {
+                    LOGGER.warn("Can't load features repository {}", uri, e);
             }
         }
         List<Repository> repos;


Mime
View raw message