karaf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gno...@apache.org
Subject [4/4] git commit: [KARAF-2930] Remove annoying warning when not using any global repository
Date Fri, 25 Apr 2014 15:26:37 GMT
[KARAF-2930] Remove annoying warning when not using any global repository

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

Branch: refs/heads/master
Commit: 3610b1dd8547ee3cda032b7b69237af87a9b3dd0
Parents: 400e940
Author: Guillaume Nodet <gnodet@gmail.com>
Authored: Fri Apr 25 17:13:53 2014 +0200
Committer: Guillaume Nodet <gnodet@gmail.com>
Committed: Fri Apr 25 17:13:53 2014 +0200

----------------------------------------------------------------------
 .../karaf/features/internal/osgi/Activator.java       | 14 ++++++++------
 1 file changed, 8 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/karaf/blob/3610b1dd/features/core/src/main/java/org/apache/karaf/features/internal/osgi/Activator.java
----------------------------------------------------------------------
diff --git a/features/core/src/main/java/org/apache/karaf/features/internal/osgi/Activator.java
b/features/core/src/main/java/org/apache/karaf/features/internal/osgi/Activator.java
index 8dbbf7c..81fdf49 100644
--- a/features/core/src/main/java/org/apache/karaf/features/internal/osgi/Activator.java
+++ b/features/core/src/main/java/org/apache/karaf/features/internal/osgi/Activator.java
@@ -134,12 +134,14 @@ public class Activator extends BaseActivator {
         String[] resourceRepositories = getString("resourceRepositories", "").split(",");
         for (String url : resourceRepositories) {
             url = url.trim();
-            if (url.startsWith("json:")) {
-                repositories.add(new JsonRepository(url.substring("json:".length())));
-            } else if (url.startsWith("xml:")) {
-                repositories.add(new XmlRepository(url.substring("xml:".length())));
-            } else {
-                logger.warn("Unrecognized resource repository: " + url);
+            if (!url.isEmpty()) {
+                if (url.startsWith("json:")) {
+                    repositories.add(new JsonRepository(url.substring("json:".length())));
+                } else if (url.startsWith("xml:")) {
+                    repositories.add(new XmlRepository(url.substring("xml:".length())));
+                } else {
+                    logger.warn("Unrecognized resource repository: " + url);
+                }
             }
         }
         Repository globalRepository;


Mime
View raw message