commit | 8d7d4e05a861c6a6d9e3aec48c34ab6abd1d46d0 | [log] [tgz] |
---|---|---|
author | Guillaume Nodet <gnodet@apache.org> | Thu Feb 18 16:48:04 2010 +0000 |
committer | Guillaume Nodet <gnodet@apache.org> | Thu Feb 18 16:48:04 2010 +0000 |
tree | 17f4112a1db18e8854b5dd169e060420002b961c | |
parent | 6d72924526027c9a1587c9d7df458da4922cb6ec [diff] |
[karaf] Fix NPE in the OBR refreshUrl command git-svn-id: https://svn.apache.org/repos/asf/felix/trunk@911484 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/karaf/shell/obr/src/main/java/org/apache/felix/karaf/shell/obr/RefreshUrlCommand.java b/karaf/shell/obr/src/main/java/org/apache/felix/karaf/shell/obr/RefreshUrlCommand.java index a4d7e2e..888d6f8 100644 --- a/karaf/shell/obr/src/main/java/org/apache/felix/karaf/shell/obr/RefreshUrlCommand.java +++ b/karaf/shell/obr/src/main/java/org/apache/felix/karaf/shell/obr/RefreshUrlCommand.java
@@ -31,7 +31,7 @@ List<String> urls; protected void doExecute(RepositoryAdmin admin) throws Exception { - if (urls != null || urls.isEmpty()) { + if (urls != null && !urls.isEmpty()) { for (String url : urls) { admin.removeRepository(new URL(url)); admin.addRepository(new URL(url));